btm icon indicating copy to clipboard operation
btm copied to clipboard

Closing a connection with "usageCount > 1" is actually possible.

Open rankinc opened this issue 10 years ago • 2 comments

JdbcPooledConnection.close() says:

// this should never happen, should we throw an exception or log at warn/error?
if (usageCount > 0) {
    log.warn("close connection with usage count > 0, " + this);
}

However, should JdbcPooledConnection.getConnectionHandle() throw an exception because (e.g.) testConnection() has failed, then usageCount will still have been incremented when XAPool.getConnectionHandle() tries to close the invalid connection.

rankinc avatar Apr 01 '14 23:04 rankinc