JBoss 6 中的事务日志记录

发布于 2024-11-18 04:21:56 字数 258 浏览 1 评论 0原文

在这个问题中:

如何调试 CMT 事务边界?

给出了一些说明配置 JBoss 来记录事务开始、提交等事件。我使用的是 JBoss 6,并且没有文件“.../server/conf/jbossjta-properties.xml”。在这个新版本中是否可以实现相同的日志记录?

In this question:

How to debug CMT transaction boundaries?

some instructions are given for configuring JBoss to log transaction begin, commit etc. events. I'm using JBoss 6, and don't have the file ".../server/conf/jbossjta-properties.xml". Is is possible to achieve the same logging in this newer version?

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

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

发布评论

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

评论(1

我要还你自由 2024-11-25 04:21:56

您可以尝试在jboss-logging.xml文件中设置日志记录。

您可以找到日志级别为 INFO 的记录器类别 com.arjuna.ats。您只需将其更改为 TRACE 并检查它是否适合您。

<logger category="com.arjuna.ats">
    <level name="TRACE" />
</logger>

您可以在 log/server.log 文件中找到此类信息:

2011-07-04 21:58:25,861 TRACE [com.arjuna.ats.jta] (http-127.0.0.1-8080-1) BaseTransaction.getStatus
2011-07-04 21:58:25,862 TRACE [com.arjuna.ats.jta] (http-127.0.0.1-8080-1) BaseTransaction.begin
2011-07-04 21:58:25,862 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) StateManager::StateManager( 2, 0 )
2011-07-04 21:58:25,862 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) BasicAction::BasicAction()
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) BasicAction::Begin() for action-id 0:ffff7f000101:126a:4e121a3c:1d4
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) BasicAction::actionInitialise() for action-id 0:ffff7f000101:126a:4e121a3c:1d4
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) ActionHierarchy::ActionHierarchy(5)
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) ActionHierarchy::add(0:ffff7f000101:126a:4e121a3c:1d4, 1)
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) BasicAction::addChildThread () action 0:ffff7f000101:126a:4e121a3c:1d4 adding Thread[http-127.0.0.1-8080-1,5,jboss]
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) BasicAction::addChildThread () action 0:ffff7f000101:126a:4e121a3c:1d4 adding Thread[http-127.0.0.1-8080-1,5,jboss] result = true
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) TransactionReaper::insert ( BasicAction: 0:ffff7f000101:126a:4e121a3c:1d4 status: ActionStatus.RUNNING, 300 )
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) ReaperElement::ReaperElement ( BasicAction: 0:ffff7f000101:126a:4e121a3c:1d4 status: ActionStatus.RUNNING, 300 )
2011-07-04 21:58:25,864 TRACE [com.arjuna.ats.jta] (http-127.0.0.1-8080-1) TransactionImple.getStatus
2011-07-04 21:58:25,864 TRACE [com.arjuna.ats.jta] (http-127.0.0.1-8080-1) TransactionImple.registerSynchronization

You can try to set logging in jboss-logging.xml file.

You can find there logger category com.arjuna.ats with log level INFO. You can just change it to TRACE and check if it works for you.

<logger category="com.arjuna.ats">
    <level name="TRACE" />
</logger>

You can find such information in log/server.log file:

2011-07-04 21:58:25,861 TRACE [com.arjuna.ats.jta] (http-127.0.0.1-8080-1) BaseTransaction.getStatus
2011-07-04 21:58:25,862 TRACE [com.arjuna.ats.jta] (http-127.0.0.1-8080-1) BaseTransaction.begin
2011-07-04 21:58:25,862 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) StateManager::StateManager( 2, 0 )
2011-07-04 21:58:25,862 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) BasicAction::BasicAction()
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) BasicAction::Begin() for action-id 0:ffff7f000101:126a:4e121a3c:1d4
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) BasicAction::actionInitialise() for action-id 0:ffff7f000101:126a:4e121a3c:1d4
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) ActionHierarchy::ActionHierarchy(5)
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) ActionHierarchy::add(0:ffff7f000101:126a:4e121a3c:1d4, 1)
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) BasicAction::addChildThread () action 0:ffff7f000101:126a:4e121a3c:1d4 adding Thread[http-127.0.0.1-8080-1,5,jboss]
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) BasicAction::addChildThread () action 0:ffff7f000101:126a:4e121a3c:1d4 adding Thread[http-127.0.0.1-8080-1,5,jboss] result = true
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) TransactionReaper::insert ( BasicAction: 0:ffff7f000101:126a:4e121a3c:1d4 status: ActionStatus.RUNNING, 300 )
2011-07-04 21:58:25,863 TRACE [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) ReaperElement::ReaperElement ( BasicAction: 0:ffff7f000101:126a:4e121a3c:1d4 status: ActionStatus.RUNNING, 300 )
2011-07-04 21:58:25,864 TRACE [com.arjuna.ats.jta] (http-127.0.0.1-8080-1) TransactionImple.getStatus
2011-07-04 21:58:25,864 TRACE [com.arjuna.ats.jta] (http-127.0.0.1-8080-1) TransactionImple.registerSynchronization
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文