1 Reply Latest reply on Jun 1, 2012 10:05 AM by alesj

    7.1.2.Final, infinispan, domain mode

    justdoit

      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.