I got a transaction timeout warning message from the log file as below :
TransactionImpl] Transaction Transac
tionImpl:XidImpl[FormatId=257, GlobalId=pmtisap01/232246, BranchQual=, localId=2
32246] timed out. status=STATUS_ACTIVE
Could you tell me what is the meaning of each of the number like localId, BranchQual, GlobalId and FormatID? I guess one of those are the transaction ID. If I got this warning message, how can I retrieve more information of this transaction via the transaction ID? Please advise
I suppose you use a JBoss version <=4.2 because of the Tx manager.
AFAIK the GlobalId will be generated related to the settings of jboss-service.xml Tx-MBean, the local one I suppose is used for internal handling within this JVM.
But I suppose you want to know what business case is affected.
For this information you must have the thread information or the Exception if your logic try to use such outtimed transaction context.
My version is 4.0.4. Actually, the reason of asking this question is that we sometimes discover this log message in the log file/console. In order to trace the origin, I need to understand to find out which part of code related to the transaction via the transaction id.
Because there are lots of transactional area in an application/software(i.e. tx.beign()..... tx.commit()). But we only got such transaction warning message in the log file, how can we identify the corresponding transactional area by the transaction id of the log message. I think most people are interested in this topic.
If any expert has this experience or idea, you are welcome to share your experience.
As I wrote before you should activate the thread information (%t for the appender pattern).
This will show you the thread where the transaction timed out, you have to look back for this thread to the beginning of your code.
Maybe the transaction takes too long because of GC, DB locks or other delays .