Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 64229 invoked from network); 13 Nov 2007 01:18:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2007 01:18:21 -0000 Received: (qmail 34938 invoked by uid 500); 13 Nov 2007 01:18:02 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 34858 invoked by uid 500); 13 Nov 2007 01:18:02 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 34742 invoked by uid 99); 13 Nov 2007 01:18:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 17:18:01 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2007 01:18:59 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F3769714238 for ; Mon, 12 Nov 2007 17:17:50 -0800 (PST) Message-ID: <6064972.1194916670994.JavaMail.jira@brutus> Date: Mon, 12 Nov 2007 17:17:50 -0800 (PST) From: "Arie (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (DBCP-248) setting maxWait does not work as expected MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org setting maxWait does not work as expected ----------------------------------------- Key: DBCP-248 URL: https://issues.apache.org/jira/browse/DBCP-248 Project: Commons Dbcp Issue Type: Improvement Reporter: Arie My expectation was that if maxWait is set to X seconds and there are N requests waiting to get a connection (in a case where the pool is bounded and all the connection are used) if none of the used connection gets free than all N requests will time-out at the same time. In reality it seems that 1 request will be timed-out after X seconds the second one after 2 * X and the last one after N * X. The problem is that getPooledConnectionAndInfo is synchronized (and therefore will look all N requests) and only one request will be processed at the time. This process includes waiting until freed connection or timed-out (done by commons.pool GenericKeyedObjectPool). I am not sure why the getPooledConnectionAndInfo has to be synchronized and not only the pool creation part. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.