commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DBCP-229) Track callers of active connections for debugging
Date Tue, 10 Jul 2007 14:42:04 GMT

    [ https://issues.apache.org/jira/browse/DBCP-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511461
] 

Henri Yandell commented on DBCP-229:
------------------------------------

This would be a cool debug mode to have, though I wonder if it would get used more than the
alternatives of logging or a profiling/debugging tool.

Have we considered a JMX wrapper for DBCP? That would be one way to access such debug data.

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message