1 Reply Latest reply on Nov 21, 2006 2:58 PM by Weston M. Price

    How to obtain transactions state?

    ulfreich Newbie

      Hi, I've been using Jboss AS for quite a while, and every now and then I get "Already Marked for Rollback" javax.transaction.RollbackExceptions, obviously caused by an incorrect use of transactions. My question is, is there any way to browse the transactions of the TransactionManager in Jboss AS? Can any info be obtained from the TXManager that can help detect where the problem ocurred (e.g. what class caused the transaction synchronization problem)?

      Thanks for your help!

        • 1. Re: How to obtain transactions state?
          Weston M. Price Master

          The JMX console gives a limited amount of information. Typically this amounts to a few basic statistics like active transaction count, rolled back count etc.

          To really get decent information TRACE level logging should be enabled. In your log4j.xml file you should see a few entries like the following:

           <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
           <category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
           <priority value="TRACE" class="org.jboss.logging.XLevel"/>

          You can enable TRACE for any category you wish, however, when it comes to transactions two categories really are important

          org.jboss.resource.connectionmanager (JCA/JDBC/JMS)

          org.jboss.tm (JTA/TransactionManager)

          Be forwarned, this will produde quite a bit of output, so the more you can narror down the problem area after a few runs the better. Note, sometimes find it helpful to create another appender just to do TRACE level stuff to get a better read of the logs.

          Note, if you have a specific issue you can always post it to the JBoss/JCA forum.