2 Replies Latest reply on Oct 15, 2007 4:51 PM by Jeremy Norris

    JBossCache standalone with JBossTM

    Jeremy Norris Newbie

      JBossCache 1.4.1.SP3
      JBossTM 4.2.3.SP5

      I am having trouble getting transaction support working.

      I have made the following transaction lookup class,

      public class JBossTMTransactionManagerLookup implements TransactionManagerLookup {
       public TransactionManager getTransactionManager() throws Exception {
       return com.arjuna.ats.jta.TransactionManager.transactionManager();

      and configured it in the treecache xml file:

      <attribute name="TransactionManagerLookupClass">....JBossTMTransactionManagerLookup</attribute>

      Then, I create transactions like this:

       UserTransaction tx = com.arjuna.ats.jta.UserTransaction.userTransaction();
       // cache get/put operations:

      This does not work. The TransactionManagerLookup class is never called. Furthermore, if it is called, I don't understand how JBossCache determines if there is a transaction open it can participate in. Does it lookup it's transaction manager and ask if there are any open transactions in the current Thread, or something like that?