tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51786] New: Discarded connection stay active in pool
Date Thu, 08 Sep 2011 11:50:52 GMT

             Bug #: 51786
           Summary: Discarded connection stay active in pool
           Product: Tomcat Modules
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: jdbc-pool
    Classification: Unclassified

I wrote an JdbcInterceptor that flag connection as discarded in case of
Exception that makes the connection unusable.
The problem is:
when I call close on the connection, it is not returned to the pool and it is
still considered as an active connection in the pool.
The cause of the problem is those pieces of code in ProxyConnection:

if (compare(CLOSE_VAL,method)) {
            if (isClosed()) return null; //noop for already closed.
            PooledConnection poolc = this.connection;
            this.connection = null;
            return null;


public boolean isClosed() {
        return connection==null || connection.isDiscarded();

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message