How to get more detailed information about the datasource and connection apart from trace and spy logging ?

Solution Unverified - Updated -

Issue

  • The SQL Trace and Spy logging does not provide more detailed information about the connection wrapper and the connection id.
  • We have connection tracing on which give us the following, but it would be nice if the output gave some sort of connection identifier to be able to see which connection each line is referring to. With a loaded app that has many connections going, it is impossible to correlate the data without some sort of connection id. Is there any way to do this?
2015-05-01 08:05:51,703 ERROR [test.scheduler.TestStartup] (Thread-184) TestStartup starting....
2015-05-01 08:05:51,984 DEBUG [jboss.jdbc.spy] (MSC service thread 1-1) java:jboss/datasources/TestDS [Connection] prepareStatement(select permissionid, constant from testtable)
2015-05-01 08:05:51,990 DEBUG [jboss.jdbc.spy] (MSC service thread 1-1) java:jboss/datasources/TestDS [PreparedStatement] executeQuery()
2015-05-01 08:05:52,006 DEBUG [jboss.jdbc.spy] (MSC service thread 1-1) java:jboss/datasources/TestDS [ResultSet] next()
2015-05-01 08:05:52,006 DEBUG [jboss.jdbc.spy] (MSC service thread 1-1) java:jboss/datasources/TestDS [ResultSet] getString(1)
2015-05-01 08:05:52,006 DEBUG [jboss.jdbc.spy] (MSC service thread 1-1) java:jboss/datasources/TestDS [ResultSet] getString(2)
2015-05-01 08:05:52,021 DEBUG [jboss.jdbc.spy] (MSC service thread 1-1) java:jboss/datasources/TestDS [ResultSet] next()
2015-05-01 08:05:52,021 DEBUG [jboss.jdbc.spy] (MSC service thread 1-1) java:jboss/datasources/TestDS [ResultSet] getString(1)
2015-05-01 08:05:52,021 DEBUG [jboss.jdbc.spy] (MSC service thread 1-1) java:jboss/datasources/TestDS [ResultSet] getString(2)
2015-05-01 08:05:52,021 DEBUG [jboss.jdbc.spy] (MSC service thread 1-1) java:jboss/datasources/TestDS [ResultSet] next()

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.