Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 17540 invoked from network); 10 Mar 2005 11:04:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Mar 2005 11:04:44 -0000 Received: (qmail 36245 invoked by uid 500); 10 Mar 2005 11:04:40 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 36176 invoked by uid 500); 10 Mar 2005 11:04:40 -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 36161 invoked by uid 99); 10 Mar 2005 11:04:39 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 10 Mar 2005 03:04:37 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (8.12.11/8.12.11) with ESMTP id j2AB4YEY003513 for ; Thu, 10 Mar 2005 12:04:34 +0100 Received: (from nobody@localhost) by ajax.apache.org (8.12.11/8.12.11/Submit) id j2AB4Y86003510; Thu, 10 Mar 2005 12:04:34 +0100 Date: Thu, 10 Mar 2005 12:04:34 +0100 Message-Id: <200503101104.j2AB4Y86003510@ajax.apache.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 33949] New: - genericKeyedObjectPool.borrowObject() calls activateObject in synchronized mode X-Bugzilla-Reason: AssignedTo X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.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://issues.apache.org/bugzilla/show_bug.cgi?id=33949 Summary: genericKeyedObjectPool.borrowObject() calls activateObject in synchronized mode Product: Commons Version: 1.2 Final Platform: Other OS/Version: FreeBSD Status: NEW Severity: normal Priority: P2 Component: Pool AssignedTo: commons-dev@jakarta.apache.org ReportedBy: Georg.Koltermann@mscsoftware.com This is in commons-pool rel. 1.2 The method borrowObject in genericKeyedObjectPool is synchronized. It first retrieves a poolable object from its internal data structures and then calls _factory.activateObject() for it. The problem is, if the activateObject() takes a while (e.g. for a DB connection it might probe if the connection is still alive, and that takes a while on broken network connections), then the thread will be stuck. And since the call is made from out of the synchronized borrowObject(), the whole pool will be blocked for quite a while! I'd suggest to explicitly synchronize around the critical parts of the method which access internal data structures, but to call the activateObject method from non-synchronized code. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org