0 Replies Latest reply on Apr 25, 2010 12:37 AM by Wei Xue

    Why TransactionManager.commit() takes too much time?

    Wei Xue Newbie

      I am using jboss cache 3.2.0 in my application which is deployed on jboss 5.1.0.GA  AS.

       

      During load testing, we encountered an issue which a request involving a transaction takes a long time to process. It turns out

      the commit of transaction takes too much time.

       

      I registered a synchronization object (which prints out the time of beforeCommitted and afterCommitted) with the transaction.

       

      01:22:12,213 INFO  [STDOUT] Processing keepAlive request at:20100423 012212213-0700
      01:22:12,214 INFO  [STDOUT] The transaction is being committed at 20100423 012212214-0700
      01:22:14,411 WARN  [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX a116caa:a5e2:4bd1434e:385f in state  RUN
      01:22:14,748 INFO  [STDOUT] The transaction is committed at 20100423 012214748-0700

       

      I also set TransactionTimeout to 1 second and the commit took 2 seconds, but I did not get any exception excepts the above warning. The transaction is still committed which is strange to me although it is already timed out.

       

      Here is what I implemented:

      1)jboss cache xml configuration:

      <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>

       

      2)

      transactionManager =  cache.getConfiguration().getRuntimeConfig().getTransactionManager();

      transactionManager.setTransactionTimeout(1);

      transactionManager.begin();

      transactionManager.getTransaction().registerSynchronization(new SynchronizationImpl());

      update node1

      create node2

      remove node3

      transactionManager.commit();

       

      Please help me to solve this problem.

       

      Thanks a lot!

      Wei