Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transaction logging in JBoss 6

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?

like image 977
Matt R Avatar asked Jul 01 '11 09:07

Matt R


People also ask

What does JBoss use for logging?

The jboss-logging jar is a required dependency of Hibernate and therefore will always need to be on the classpath. To use JBoss Logging with Log4j, the log4j jar would also need to be available on the classpath. To use JBoss Logging with Log4j2, the log4j2 jar would also need to be available on the classpath.

What are the logging levels in JBoss?

By default, JBoss produces output to both the console and a log file ( log/server. log ). There are six basic log levels in log4j: TRACE , DEBUG , INFO , WARN , ERROR and FATAL .

What is JBoss transaction?

The JBossTX architecture allows for any Java Transaction API (JTA) transaction manager implementation to be used. JBossTX includes a fast in-VM implementation of a JTA compatible transaction manager that is used as the default transaction manager.


1 Answers

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
like image 121
Lukasz Stelmach Avatar answered Oct 01 '22 01:10

Lukasz Stelmach