Hi, 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; pool.returnConnection(poolc); return null; } and public boolean isClosed() { return connection==null || connection.isDiscarded(); }
Thanks for report. This is fixed in r1170479 and r1170485 and will be in 7.0.22 onwards.