[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [jira] [Resolved] (DBCP-391) Close on invalid connections throws unexpected exception
From:       "Mark Thomas (JIRA)" <jira () apache ! org>
Date:       2014-01-31 21:10:11
Message-ID: JIRA.12606261.1346860107901.19692.1391202611893 () arcas
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/DBCP-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Mark Thomas resolved DBCP-391.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0
                   1.5.1

Thanks for the report and the analysis. Sorry it has taken so long to address this.

I've fixed trunk for the 2.x series the 1.5.x branch. It will be included in the next \
release of each.

If there are further 1.3.x and 1.4.x releases (currently being discussed on the dev \
mailing list) my expectation is that they will be generated from the 1.5.x branch so \
will pick up this fix too.

> Close on invalid connections throws unexpected exception
> --------------------------------------------------------
> 
> Key: DBCP-391
> URL: https://issues.apache.org/jira/browse/DBCP-391
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 1.2.2, 1.3, 1.4
> Reporter: Markus Stier
> Fix For: 1.5.1, 2.0
> 
> 
> If the underlying connection of a PoolableConnection becomes invalid due to network \
> errors etc., it is not possible to remove it from the pool by using the \
> close-strategy. In case of an exception I'd check if the connection is already \
> closed (=returned to pool). If not I'd close it to return it to the pool.  Two \
>                 problems:
> * The method isClosed() returns true, even if the PoolableConnection has not the \
> _closed state because of _conn.isClosed() returns true. The defective connection \
>                 remains active, consuming connections. 
> * The method close throws an SQLException ("already closed") if (and only if) the \
> underlying connection is closed. If the PoolableConnection is in _closed state, \
> close() returns silently (as expected)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic