JBOSS 6:[CachedConnectionManager]为您关闭连接.请自己关闭 [英] JBOSS 6: [CachedConnectionManager] Closing a connection for you. Please close them yourself

查看:335
本文介绍了JBOSS 6:[CachedConnectionManager]为您关闭连接.请自己关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次JBOSS 6中的事务结束时,我都会遇到异常.我知道我不是手动关闭连接,但是我想通过更改记录器模式来避免这种情况.为此,我添加了以下几行

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>

在jboss-6.1.0_Final/server/default/deploy下的 jboss-logging.xml 中. 问题是它没有反映在控制台上.根记录器处于INFO模式. 确切的堆栈跟踪是

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]

如果有人能让我知道jboss-logging.xml的文档,我将不胜感激.我们已经从Jobss 4迁移而来,后者在conf dir下具有jog4j.xml.这两个文件都是相似的吗?

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 ?

推荐答案

track-statements:此布尔元素指定是否检查 将连接返回到池时未关闭的语句.如果 如果为true,则会为每个未结束的语句发出警告消息.如果 log4j类别 org.jboss.resource.adapter.jdbc.WrappedConnection 启用了跟踪级别,连接关闭调用的堆栈跟踪为 以及记录.这是一个调试功能,可以在 生产.

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.

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

这篇关于JBOSS 6:[CachedConnectionManager]为您关闭连接.请自己关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆