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 12869] New: - Abandoned Connections are never closed
Date Fri, 20 Sep 2002 17:51:55 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=12869>.
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=12869

Abandoned Connections are never closed

           Summary: Abandoned Connections are never closed
           Product: Commons
           Version: 1.0 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Dbcp
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: richard_atkinson@hotmail.com


Abandoned Connections are never closed even when all the correct properties 
have been set and there are the requisite number of active and idle 
Connections.  This appears to be because lastUsed property is not updated on 
the PoolableConnection.  When the removedAbandoned() is called on the 
AbandonedObjectPool it ignores all the abandoned connections because they have 
lastUsed times of 0.

Modifying the activate() method on DelegatingConnection to update the lastUsed 
time corrects the problem for me.  I'm not sure if that is the best way of 
fixing it.

    protected void activate() {
        _closed = false;
+       this.setLastUsed();
        if(_conn instanceof DelegatingConnection) {
            ((DelegatingConnection)_conn).activate();
        }
    }

Since Tomcat 4.1 went stable I expect lots of people are going to be hitting 
this problem soon.

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


Mime
View raw message