jbossjboss6.x

JBOSS 6: [CachedConnectionManager] Closing a connection for you. Please close them yourself


I am getting an exception every time a transaction gets over in JBOSS 6. I understand that I am not closing the connection manually, but I want to avoid it by changing the logger mode. For achieving this I added the following lines

<logger category="org.jboss.resource.connectionmanager.CachedConnectionManager">
      <level name="FATAL"/>
   </logger>

in jboss-logging.xml under jboss-6.1.0_Final/server/default/deploy. The problem is it's not reflecting on the console. The root logger is in INFO mode. The exact stack trace is

INFO  [CachedConnectionManager] Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@d0249e: java.lang.Throwable: STACKTRACE
    at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:278) [:6.1.0.Final]
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:524) [:6.1.0.Final]
    at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941) [:6.1.0.Final]
    at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89) [:6.1.0.Final]
    at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92) [:3.6.6.Final]
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) [:3.6.6.Final]
    at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) [:3.6.6.Final]
    at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:74) [:3.6.6.Final]

I would appreciate if anyone can let me know documentation on jboss-logging.xml . We have migrated from Jobss 4 which had jog4j.xml under conf dir . Are both these files are similar ?


Solution

  • track-statements : This boolean element specifies whether to check for unclosed statements when a connection is returned to the pool. If true, a warning message is issued for each unclosed statement. If the log4j category org.jboss.resource.adapter.jdbc.WrappedConnection has trace level enabled, a stack trace of the connection close call is logged as well. This is a debug feature that can be turned off in production.

    source: http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/beta500/html/ch13s13.html