I'm trying to start a transaction on infinispan cache in domain mode.
cache in domain.xml is defined like this:
<replicated-cache name="cache1" mode="SYNC">
<transaction mode="NON_XA" locking="PESSIMISTIC"/>
<eviction strategy="LRU" max-entries="100"/>
</replicated-cache>
The code looks like this:
TransactionManager tm = cache.getAdvancedCache().getTransactionManager();
tm.begin();
cache.lock("key1");
Unfortunatelly cache.getAdvancedCache().getTransactionManager() always returns null.
The question is what would be the proper way to configure the replicated infinispan cache in order to be able to use transactions on it.
Imo, the TM should already be there by default, unless explicity disabled.