I'm having trouble removing a cache from a DefaultCacheManager while inside a transactional method. The code I am using follows which is called from another method that is marked as @Transactional. I am currently using Atomikos from within a spring managed application to handle transactions.
Cache cacheToRemove = cacheManager.getCache(name, false);
if (cacheToRemove != null)
In debugging the issue, it seems the code in the org.infinispan.transaction.TransactionTable.shutdownGracefully() method loops until there are no transactions that are current or until it times out. It seems that because I'm removing the cache within a transaction, this will always timeout. I guess my question is, am I doing the right steps to remove a cache, and if so, is it possible to remove a cache from within a transaction? Should it be run asynchronously? If so, is that a configuration setting or do I need to spin up the thread myself?
Thank you for any help that can be provided.
Is there anyone on the infinispan development team that can help out on this or point me in the right direction? We are in the process of evaluating Infinispan along with Modeshape to see if we can leverage its capabilities in a clustered environment. Any help would be greatly appreciated.