[jboss-user] [JBossCache] - JBossCache standalone with JBossTM

jnorris10 do-not-reply at jboss.com
Fri Aug 31 12:16:02 EDT 2007


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();
  |         
  |         tx.begin();
  |         // cache get/put operations:
  |         tx.commit();
  | 

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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080079#4080079

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080079



More information about the jboss-user mailing list