commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Costa (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DBCP-401) PoolableConnectionFactory.validateConnection() doesn't test connection.isValid()
Date Wed, 16 Oct 2013 03:33:42 GMT
Paulo Costa created DBCP-401:
--------------------------------

             Summary: PoolableConnectionFactory.validateConnection() doesn't test connection.isValid()
                 Key: DBCP-401
                 URL: https://issues.apache.org/jira/browse/DBCP-401
             Project: Commons Dbcp
          Issue Type: Bug
            Reporter: Paulo Costa
            Priority: Minor


On my environment, we sometimes get notified that something was changed on the DB servers
(servers added/removed from the pool, master/slave promotion, etc).

In these cases, we want to discard all existing connections in the pool and let it create
new ones with the updated configuration.

My initial idea is to have existing Connections returning isValid() == false after these events.
But, after lots of debugging, it turns out that having the connection.isValid() returning
false doesn't make it go away from the connection pool, since it is never checked.

Fixing it would be very simple, and I can send you the patch, but I don't know if there is
any reason it was left out in the first place, or if it would cause compatibility issues (Probably
not).



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message