Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 58399 invoked from network); 20 Sep 2002 17:51:20 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 20 Sep 2002 17:51:20 -0000 Received: (qmail 4259 invoked by uid 97); 20 Sep 2002 17:51:59 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 4240 invoked by uid 97); 20 Sep 2002 17:51:57 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 4188 invoked by uid 50); 20 Sep 2002 17:51:55 -0000 Date: 20 Sep 2002 17:51:55 -0000 Message-ID: <20020920175155.4187.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 12869] New: - Abandoned Connections are never closed X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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: For additional commands, e-mail: