Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 33755 invoked from network); 19 Oct 2005 20:40:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Oct 2005 20:40:12 -0000 Received: (qmail 21461 invoked by uid 500); 19 Oct 2005 20:40:06 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 21424 invoked by uid 500); 19 Oct 2005 20:40:05 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 21413 invoked by uid 99); 19 Oct 2005 20:40:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Oct 2005 13:40:05 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of PSitowitz@verisign.com designates 216.168.239.75 as permitted sender) Received: from [216.168.239.75] (HELO osprey.verisign.com) (216.168.239.75) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Oct 2005 13:40:03 -0700 Received: from dul1wnexcn02.vcorp.ad.vrsn.com (dul1wnexcn02.vcorp.ad.vrsn.com [10.170.12.139]) by osprey.verisign.com (8.13.1/8.12.11) with ESMTP id j9JKsT92028614 for ; Wed, 19 Oct 2005 16:54:29 -0400 Received: from dul1wnexmb02.vcorp.ad.vrsn.com ([10.170.12.135]) by dul1wnexcn02.vcorp.ad.vrsn.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 19 Oct 2005 16:39:41 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [dbcp] question regarding connection pooling and prepared statements Date: Wed, 19 Oct 2005 16:39:40 -0400 Message-ID: <8E3CEBE48A01E94EBA2A07A1695FFE61EF330D@dul1wnexmb02.vcorp.ad.vrsn.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [dbcp] question regarding connection pooling and prepared statements Thread-Index: AcXU430NUCdt/epxRfiLMTUZRCCU/wACUcKg From: "Sitowitz, Paul" To: "Jakarta Commons Users List" X-OriginalArrivalTime: 19 Oct 2005 20:39:41.0394 (UTC) FILETIME=[3B1BC320:01C5D4ED] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Bill, Prepared Statements are on a per-connection level. In fact, if you turn on DBCP PrepareStatement pooling, a separate PrepareStatement pool will be maintained for each Db connection. The PreparedStatement therefore is tightly coupled with the connection that created it. Paul -----Original Message----- From: Hudson, Bill [mailto:bhudson@extol.com]=20 Sent: Wednesday, October 19, 2005 3:34 PM To: commons-user@jakarta.apache.org Subject: [dbcp] question regarding connection pooling and prepared statements =20 Question: I am trying to determine if commons-dbcp provides this functionality: Can a prepared statement be generated against a connection obtained from the a connection pool, say "connection x". Then can connection x be returned to the pool, and at a later time can the prepared statement be used with a different connection, say "connection y", obtained from the same connection pool (both connections against same database, using the same driver). In other words, if I maintain a reference to a prepared statement, will that reference be valid regardless of what connection the underlying pool provides to me over the course of my application's execution time? To phrase the question differently: are prepared statements on a per-connection level, or are they "global" to all connections in the connection pool? --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org