This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
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.
 
GeeCON Prague 2014
 
subject: Help in tracking down open database connections