You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mark Thomas (JIRA)" <ji...@apache.org> on 2014/02/05 23:40:18 UTC
[jira] [Resolved] (DBCP-401)
PoolableConnectionFactory.validateConnection() doesn't test
connection.isValid()
[ https://issues.apache.org/jira/browse/DBCP-401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Thomas resolved DBCP-401.
------------------------------
Resolution: Duplicate
> 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
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> 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.5#6160)