• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Detecting Connection Leaks in JBoss

Detecting Connection Leaks in JBoss

Detecting Connection Leaks

JBoss has a CachedConnectionManager service that can be used to detect connection leaks (within the scope of a request)

Configured in ${jboss.server.url}/deploy/jbossjca-service.xml

Triggered by Tomcat’s server.xml→<Host>→CachedConnectionValve

Enabled by default – slight overhead

Should be used during testing

Can be turned off in production if the code is stable

If the CachedConnectionValve is enabled in Tomcat’s server.xml file, then Tomcat must wait for the CachedConnectionManager service on startup. This is accomplished by adding the following line to Tomcat’s META-INF/jboss-service.xml file (near the end):

<depends>jboss.jca:service=CachedConnectionManager</depends>

Learn the core features of JBOSS Traning and become master with our expertise tutorials.

Connection pools could be monitored (through JMX) by looking at jboss.jca:name=MyDS,service=ManagedConnectionPool→InUseConnectionCount attribute.

The example web application northwind.war can be made to leak resources (on /ListCustomers) by

appending requesting /ListCustomers?leak=true, and/or by

adding a custom system property: -Dleak.jdbc.resources=true to JAVA_OPTS in run.conf or run.bat (on Windows)

For indepth understanding on JBoss click on:

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Detecting Connection Leaks in JBoss"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.