commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Didion (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DBCP-146) [dbcp] Invalidate "broken" connections by monitoring SQLExceptions
Date Tue, 29 Aug 2006 03:10:23 GMT
    [ http://issues.apache.org/jira/browse/DBCP-146?page=comments#action_12431124 ] 
            
John Didion commented on DBCP-146:
----------------------------------

It would be cool if DBCP could be configured to "remember" statements executed on a given
connection and, if the connection is broken, silently replace the connection and re-execute
the statements. There are probably a whole host of problems with this idea that I'm not considering,
but it would be very cool if it could be made to work.

> [dbcp] Invalidate "broken" connections by monitoring SQLExceptions
> ------------------------------------------------------------------
>
>                 Key: DBCP-146
>                 URL: http://issues.apache.org/jira/browse/DBCP-146
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.1 Final
>         Environment: Operating System: All
> Platform: All
>            Reporter: Dirk Verbeeck
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: 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 contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message