如何调试CMT交易边界?

发布于 2024-10-17 05:00:32 字数 219 浏览 6 评论 0原文

我一直在研究jboss CMT,并且想了解事务如何从上到下工作,最好的方法是将调试信息打印到日志文件,我启用了org.hibernate.SQL,但是,我只得到SQL语句,日志中没有事务相关语句的“开始”或提交类型,从 org.hibernate.* 级别进行调试时保持不变。

做了一点谷歌搜索,答案似乎是调整 jbosstx-properties.xml,尝试了一下,也没有帮助。有人能帮我解决这个问题吗?

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 ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哑剧 2024-10-24 05:00:32

我遵循了第一部分中的建议:
http://i-proving.com/2010/ 05/28/在jboss-core中启用调试/
这基本上告诉你:

设置
“com.arjuna.common.util.logging.DebugLevel”
在“公共”部分
/server//conf/jbossjta-properties.xml
到0xffffffff

并确保您的 jboss-log4j 配置不会过滤掉这些消息。

并开始在日志中获取此类消息:(

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

以及数千条其他消息,但这是一个不同的故事。看起来 Arjuna/JBoss 事务不使用日志类别的想法)

在 JBoss 4.2.3.GA 上进行了测试,但我如果您尝试编辑我的 JBoss 没有的 jbosstx-properties.xml,我猜您拥有完全不同的 JBoss 版本。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文