It means you are not closing your connections to return them to the pool. To avoid connection leaks you should have code like the following:
Connection connection = dataSource.getConnection();
try
{
// DO WORK
}
finally
{
try
{
connection.close();
}
catch (Throwable ignored)
{
}
}
For jdbc you should do the same thing for Statements and ResultSets?. Normally Statements are closed when the Connection is closed, but connection pooling means the close does not happen. Similarly, if you have prepared statements in a cache, ResultSets? need to be closed.
Thread Local Patterns
Many persistent frameworks (hibernate/ojb) open and close connections "at random". i.e. As far as JBoss is concerned it looks like one ejb allocated the connection and another closed it.
The connection close checking does not understand this behaviour. It expects the same ejb that allocated the connection to also close it.
If you use such a pattern, you can turn off this message (see below) but you are on your own when it comes to detecting connection leaks. From 3.2.6 there is a "listInUseConnections" on the CachedConnectionManager.
Turning off Connection Close Checking
In production you don't need this checking. Hopefully you have found all the connection leaks during development. You can turn it off on the CachedConnectionManager.
transaction-service.xml for 3.2.x
jbossjca-service.xml for 4.x
Change "Debug" to false.
<mbean code="org.jboss.resource.connectionmanager.CachedConnectionManager"
name="jboss.jca:service=CachedConnectionManager">
<depends optional-attribute-name="TransactionManagerServiceName">jboss:service=TransactionManager</depends>
<!-- Enable connection close debug monitoring -->
<attribute name="Debug">false</attribute>
分享到:
相关推荐
赠送jar包:jboss-logging-3.4.1.Final.jar; 赠送原API文档:jboss-logging-3.4.1.Final-javadoc.jar; 赠送源代码:jboss-logging-3.4.1.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.4.1.Final....
jboss7以上版本发布ejb时需要的配置文件,jboss-ejb3.xml和ejb-jar.xml,缺少csdn分数所以上传,请见谅。
linux 环境jboss 7.1 (注jdk不要用1.8 否则不能启动)
赠送jar包:jboss-logging-3.4.3.Final.jar; 赠送原API文档:jboss-logging-3.4.3.Final-javadoc.jar; 赠送源代码:jboss-logging-3.4.3.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.4.3.Final....
赠送jar包:jboss-logging-3.3.2.Final.jar; 赠送原API文档:jboss-logging-3.3.2.Final-javadoc.jar; 赠送源代码:jboss-logging-3.3.2.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.3.2.Final....
jboss插件生成xml自动提示dtd.
赠送jar包:jboss-logging-3.4.2.Final.jar; 赠送原API文档:jboss-logging-3.4.2.Final-javadoc.jar; 赠送源代码:jboss-logging-3.4.2.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.4.2.Final....
JBoss篇:安装与配置
在jboss7\standalone\configuration\standalone.xml文件中找到<subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">做如下配置 Xml代码 收藏代码 <subsystem xmlns="urn:jboss:...
JBoss 父 POM JBoss 社区项目的父级 Maven POM。 它是什么? JBoss 父 POM 为 Maven 构建提供默认配置。 最常用的 Maven 插件的推荐/默认版本 jar 和程序集插件的清单配置 用于生成源 jar 和强制执行最低版本的 Java...
老板 jboss 开发参考
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装
Jboss经典佳作 The JBoss 5 Application Server is a Java Enterprise Edition 5 application server that provides services that most enterprise applications need, such as security, transactionality, ...
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装
赠送jar包:jboss-threads-3.1.0.Final.jar; 赠送原API文档:jboss-threads-3.1.0.Final-javadoc.jar; 赠送源代码:jboss-threads-3.1.0.Final-sources.jar; 赠送Maven依赖信息文件:jboss-threads-3.1.0.Final....
我的 JBoss 书的公共档案该存储库包含我正在编写的 JBoss 书籍的公共档案。 这意味着此处提供的信息会不断变化,直到生成本书。 这本书也是( ) 中的基础。 如果您想了解有关如何购买书籍和/或加入课程的更多详细信息...
java简易版开心农场开源JBoss EAP 和 Wildfly 应用服务器的 Puppet 模块 ...在域和单机模式下对资源和部署进行配置管理 目录 概述 该模块可以安装 JBoss 企业应用平台和 WildFly 应用服务器。 它还可以在域或独立...
microservice-starter-jboss 基于JBoss的Microservice Starter项目 移到新的存储库位置
某大牛写的jboss-exp 1. 查看系统名称 java -jar jboss_exploit_fat.jar -i http://192.168.7.84:10081/invoker/JMXInvokerServlet get jboss.system:type=ServerInfo OSName 2. 查看系统版本 java -jar jboss_...
JBoss in Action: Configuring the JBoss Application Server Publisher: Manning Publications | 2009-01-28 | ISBN: 1933988029 | PDF | 6,58 MB JBoss in Action is the first book to focus on teaching ...