commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Didion (JIRA)" <>
Subject [jira] Commented: (DBCP-146) [dbcp] Invalidate "broken" connections by monitoring SQLExceptions
Date Tue, 29 Aug 2006 03:10:23 GMT
    [ ] 
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:
>             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:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message