You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/09/20 19:51:55 UTC
DO NOT REPLY [Bug 12869] New: -
Abandoned Connections are never closed
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>