How to get Advanced Cache or configure Transaction Manager from Infinispan cache when it is configured as JCache?

244 Views Asked by At

I have a JCache cache and my caching provider is Infinispan. I need to use it as transactional cache. In Infinispan if we configure Transaction Manager, I can get it as cache.getAdvancedCache().getTransactionManager().

Since my cache is JCache, I do not see an option to do this ie; get Transaction Manager from cache. Is there any way to achieve this?

As per infinispan doc, it is fully JSR-107 compliant: https://infinispan.org/docs/stable/user_guide/user_guide.html#jcache_jsr_107

1

There are 1 best solutions below

0
On

You can use the unwrap method cache.unwrap(AdvancedCache.class);