[
https://issues.apache.org/jira/browse/DBCP-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Thomas resolved DBCP-229.
------------------------------
Resolution: Fixed
Abandoned object logging will help for DBCP < 2.0
For DBCP 2.0 the call stacks to getConnection() will be available via JMX.
> Track callers of active connections for debugging
> -------------------------------------------------
>
> Key: DBCP-229
> URL: https://issues.apache.org/jira/browse/DBCP-229
> Project: Commons Dbcp
> Issue Type: New Feature
> Reporter: Armin Häberling
> Fix For: 2.0
>
>
> Lately we got the following exception
> org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
> exhausted
> at
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103)
> at
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
> The reason for that was that some piece of code opened a connection, but
> never closed it. Tracking the active connections (and the callers of the
> getConnection method) would it make it easier to find such erroneous code.
> One possible approach would be to add the connection returned by
> BasicDataSource.getConnection together with the stacktrace in a Map holding
> all active connections. And removing the connection from the map during
> PoolableDataSource.close().
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira