When ehcache's CacheManager shuts down, it calls EhCacheXAResourceProducer.unregisterXAResource() for each cache with the cache's last XAResource.
Since no more XAResource is registered, unregisterXAResource should close the EhCacheXAResourceProducer but fails to do so, leaving an unusable XAResourceProducer registered in the ResourceRegistrar.
This can lead to this kind of exception:
bitronix.tm.recovery.RecoveryException: no XAResource registered, recovery cannot be done on bitronix.tm.resource.ehcache.EhCacheXAResourceProducer@28bb494b
at bitronix.tm.resource.ehcache.EhCacheXAResourceProducer.startRecovery(EhCacheXAResourceProducer.java:123)
at bitronix.tm.recovery.Recoverer.recover(Recoverer.java:234)
at bitronix.tm.recovery.Recoverer.recoverAllResources(Recoverer.java:204)
at bitronix.tm.recovery.Recoverer.run(Recoverer.java:119)
at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:48)
at bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:43)
When ehcache's CacheManager shuts down, it calls EhCacheXAResourceProducer.unregisterXAResource() for each cache with the cache's last XAResource.
Since no more XAResource is registered, unregisterXAResource should close the EhCacheXAResourceProducer but fails to do so, leaving an unusable XAResourceProducer registered in the ResourceRegistrar.
This can lead to this kind of exception: