This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JDBC and the fly likes Help in tracking down open database connections Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Help in tracking down open database connections" Watch "Help in tracking down open database connections" New topic
Author

Help in tracking down open database connections

David Maywis
Greenhorn

Joined: Mar 05, 2007
Posts: 1
I've inherited a large JBoss codebase that is, somewhere, not closing it's DB connections. I'm seeing errors like:

org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] )) Exception caught while getting connection to java:/H2ST: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))

I don't believe our load is sufficent to be causing these, it must be unclosed connections somewhere. Does anyone know a good way to track down such connections? Unfortunately, the database code is scattered around the codebase, and it is proving difficult to manually check.

We are using a javax.sql.Datasource as our connection factory, is it possible to query this about the open connections? Or, does anyone have any good methods or tools for tracking down open connections?

Thanks for any advice,
David M.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Help in tracking down open database connections
 
Similar Threads
JBoss Connection Pool Size
Getting org.jboss.util. NestedSQLException : No ManagedConnections available
org.jboss. util.NestedSQL Exception
Spring-Struts Issue
org.jboss. util.NestedSQL Exception