@ Override public void unregisterXAResource ( String uniqueName , XAResource xaResource ) { Ehcache3XAResourceProducer xaResourceProducer = producers . get ( uniqueName ) ; if ( xaResourceProducer != null ) { boolean found = xaResourceProducer . removeXAResource ( xaResource ) ; if ( ! found ) { throw new IllegalStateException ( "no XAResource " + xaResource + " found in XAResourceProducer with name " + uniqueName ) ; } if ( xaResourceProducer . isEmpty ( ) ) { xaResourceProducer . close ( ) ; producers . remove ( uniqueName ) ; } } else { throw new IllegalStateException ( "no XAResourceProducer registered with name " + uniqueName ) ; } }
Unregister an XAResource of a cache from BTM .