How to debug CMT transaction boundaries?

蓝咒 提交于 2019-12-22 08:49:22

问题


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 ?


回答1:


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.



来源:https://stackoverflow.com/questions/4991242/how-to-debug-cmt-transaction-boundaries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!