@Test public void testUnregister() throws Exception { assertEquals(1, ResourceRegistrar.getResourcesUniqueNames().size()); ResourceRegistrar.unregister(createMockProducer("xa-rp")); assertEquals(0, ResourceRegistrar.getResourcesUniqueNames().size()); }
public static void unregister(XAResourceProducer producer) { final ProducerHolder holder = new ProducerHolder(producer); if (!resources.remove(holder)) { if (log.isDebugEnabled()) { log.debug("resource with uniqueName '{}' has not been registered", holder.getUniqueName()); } } }
ResourceRegistrar { public static void unregister(XAResourceProducer producer) { final ProducerHolder holder = new ProducerHolder(producer); if (!resources.remove(holder)) { if (log.isDebugEnabled()) { log.debug("resource with uniqueName '{}' has not been registered", holder.getUniqueName()); } } } }
ResourceRegistrar { public static void unregister(XAResourceProducer producer) { final ProducerHolder holder = new ProducerHolder(producer); if (!resources.remove(holder)) { if (log.isDebugEnabled()) { log.debug("resource with uniqueName '{}' has not been registered", holder.getUniqueName()); } } } private  ResourceRegistrar(); }
ResourceRegistrar { public static void unregister(XAResourceProducer producer) { final ProducerHolder holder = new ProducerHolder(producer); if (!resources.remove(holder)) { if (log.isDebugEnabled()) { log.debug("resource with uniqueName '{}' has not been registered", holder.getUniqueName()); } } } private  ResourceRegistrar(); static XAResourceProducer get(final String uniqueName); static Set<String> getResourcesUniqueNames(); static void register(XAResourceProducer producer); static void unregister(XAResourceProducer producer); static XAResourceHolder findXAResourceHolder(XAResource xaResource); }
ResourceRegistrar { public static void unregister(XAResourceProducer producer) { final ProducerHolder holder = new ProducerHolder(producer); if (!resources.remove(holder)) { if (log.isDebugEnabled()) { log.debug("resource with uniqueName '{}' has not been registered", holder.getUniqueName()); } } } private  ResourceRegistrar(); static XAResourceProducer get(final String uniqueName); static Set<String> getResourcesUniqueNames(); static void register(XAResourceProducer producer); static void unregister(XAResourceProducer producer); static XAResourceHolder findXAResourceHolder(XAResource xaResource); final static String UNIQUE_NAME_CHARSET; }