[ 
https://issues.apache.org/jira/browse/DBCP-401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13796458#comment-13796458
 ] 

Paulo Costa commented on DBCP-401:
----------------------------------

I propose this diff: http://pastebin.com/AyswZmP1

> 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#6144)

Reply via email to