commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26759] New: - Invalidate "broken" connections by monitoring SQLExceptions
Date Sat, 07 Feb 2004 15:44:27 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26759>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26759

Invalidate "broken" connections by monitoring SQLExceptions

           Summary: Invalidate "broken" connections by monitoring
                    SQLExceptions
           Product: Commons
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Dbcp
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: dirk.verbeeck@pandora.be


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);
}

---------------------------------------------------------------------
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