How to debug CMT transaction boundaries?
Asked Answered
R

1

4

I have been studying jboss CMT , and would like to learn how the transaction works from top to bottom, best way would be printing debug information to the log file, I enabled org.hibernate.SQL , however, i am only getting SQL statement , there is no "begin" nor commit type of the transaction related statement in log, remains the same when debuging from org.hibernate.* level.

Did a little googling, answer seems tweaking jbosstx-properties.xml, tried that, didn't help either. Can anybody help me with this ?

Rupture answered 14/2, 2011 at 10:49 Comment(0)
S
3

I followed the advice found in the first section here: http://i-proving.com/2010/05/28/enabling-debug-in-jboss-core/ which basically tells you to:

Set "com.arjuna.common.util.logging.DebugLevel" in the "common" section of /server//conf/jbossjta-properties.xml to 0xffffffff

and make sure your jboss-log4j configuration doesn't filter out these messages.

And started getting these kind of messages in the logs:

15:13:00,276 DEBUG [logger] BaseTransaction.commit
15:13:00,283 DEBUG [logger] BaseTransaction.getStatus
15:13:00,283 DEBUG [logger] BaseTransaction.begin

(and thousands of others, but that's a different story. It looks like Arjuna/JBoss transactions don't use the logging categories idea)

Tested on JBoss 4.2.3.GA, but I guess you have a completely different version of JBoss, if you tried editing jbosstx-properties.xml which my JBoss doesn't have.

Surly answered 20/2, 2011 at 14:15 Comment(2)
I have tried this , didn't seem to get this in my log, I am using Jboss 5.1.0 GA, also set the debug level in jboss-log4j.xml com.arjuna to be debug levelRupture
Do you get any DEBUG messages in the log? I mean from other components than com.arjuna?Surly

© 2022 - 2024 — McMap. All rights reserved.