Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 46197 invoked from network); 1 Nov 2009 16:12:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Nov 2009 16:12:41 -0000 Received: (qmail 5847 invoked by uid 500); 1 Nov 2009 16:12:40 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 5708 invoked by uid 500); 1 Nov 2009 16:12:39 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 5696 invoked by uid 99); 1 Nov 2009 16:12:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 16:12:39 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [81.103.221.48] (HELO mtaout02-winn.ispmail.ntl.com) (81.103.221.48) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 16:12:37 +0000 Received: from know-smtpout-1.server.virginmedia.net ([62.254.123.1]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20091101161214.HDCS27507.mtaout02-winn.ispmail.ntl.com@know-smtpout-1.server.virginmedia.net> for ; Sun, 1 Nov 2009 16:12:14 +0000 Received: from [72.254.83.131] (helo=s2laptop-7.local) by know-smtpout-1.server.virginmedia.net with esmtpa (Exim 4.63) (envelope-from ) id 1N4d2L-0006CH-TO for dev@commons.apache.org; Sun, 01 Nov 2009 16:12:14 +0000 Message-ID: <4AEDB35B.6000207@apache.org> Date: Sun, 01 Nov 2009 08:12:11 -0800 From: Mark Thomas User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Commons Developers List Subject: Re: [dbcp] Callable statement pooling (DBCP-204) References: <4AEC659D.6040907@gmail.com> In-Reply-To: <4AEC659D.6040907@gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.0 c=1 a=rjG4UVU4zuAA:10 a=DjriUMqJybSIweQyTfoA:9 a=bQNNubZKDROP0tCC-X05R8d_s6sA:4 Phil Steitz wrote: > I agree that DBCP should support callable statement pooling and the > patch attached to DBCP-204 is a reasonable way to do it. What I am > concerned about is that adding callable statements to the prepared > statement pool with the current implementation may break some > applications by causing them to go beyond MaxPreparedStatements. > Unfortunately, the current behavior is to throw SQLException on > prepareStatement when this happens. I see four options. > > 0) Damn the torpedoes - apply patch as is Agree - too risky. > 1) Change the prepared statement pool to behave as an LRU cache This is looks like the best way to go to me, > 2) Stick with KeyedObjectPool implementation, but create and do not > pool new statements when the pool is exhausted I can think of scenarios where this could negate the benefit of the pooling in the first place. 1) seems the better choice. > 3) Leave implementation as is but add a new KeyedObjectPool for > callable statements Strikes me as adding unnecessary complexity. > I think 1) is the best option, but it is a significant change in > behavior, so should probably wait until 2.0 I can see where you are coming from but how many folks would actually complain that a SQLException wasn't thrown if their code opened too many statements? If we can see any scenarios where this would cause problems, then lets wait for 2.0. If we can't (and I can't right now), I'd vote for 1.3. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org