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 2013/07/24 01:12:48 UTC

[jira] [Resolved] (DBCP-146) [dbcp] Invalidate "broken" connections by monitoring SQLExceptions

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

Mark Thomas resolved DBCP-146.
------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 2.0)

The testOnXXX methods are the way to handle this.
                
> [dbcp] Invalidate "broken" connections by monitoring SQLExceptions
> ------------------------------------------------------------------
>
>                 Key: DBCP-146
>                 URL: https://issues.apache.org/jira/browse/DBCP-146
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.1
>         Environment: Operating System: All
> Platform: All
>            Reporter: Dirk Verbeeck
>            Priority: Minor
>         Attachments: ASF.LICENSE.NOT.GRANTED--brokenConn-patch.txt
>
>
> A PoolableConnection can know when it is "broken". (When a fatal SQLException is
> thrown.) A SQLException is considered fatal when it includes an error code from
> a configurable list of broken connection indicators.
> The attached patch is a partial implementation for review 
> (not all Delegating* methods are covered)
> Summary:
> Add a list of indicators that (when found in an SQLException) mark a Connection
> as "broken". Broken Connections will be destroyed and not returned to the pool.
> if (!isBroken()) {
>     _pool.returnObject(this);
> } else {
>     _pool.invalidateObject(this);
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira