Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 2101 invoked from network); 22 Jun 2005 20:27:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Jun 2005 20:27:16 -0000 Received: (qmail 88225 invoked by uid 500); 22 Jun 2005 20:27:09 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 88150 invoked by uid 500); 22 Jun 2005 20:27:08 -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 88125 invoked by uid 99); 22 Jun 2005 20:27:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2005 13:27:08 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [12.40.63.19] (HELO mail01.IMPRIVATA.COM) (12.40.63.19) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2005 13:27:08 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C57768.B23B9096" Subject: [dbcp] use of BasicDataSourceFactory.createDataSource(Properties) Date: Wed, 22 Jun 2005 16:26:40 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [dbcp] use of BasicDataSourceFactory.createDataSource(Properties) Thread-Index: AcV3aLHOGTQ+2Rm1RzWlr9L4iwyQUw== From: "Pramodh Peddi" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C57768.B23B9096 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi DBCP experts, =20 Is anyone using BasicDataSourceFactory.createDataSource(Properties) to create a BasicDataSource object (using version 1.2)? I have not yet used this, but I desire to use this. I can see few 'issues' when I use it: =20 * Every time BasicDataSource is created, we need to create a Properties object. Is this not going to be a performance hit? * To avoid the above performance hit, is it ok if I cache BasicDataSource (make it static variable) and re-use it every time connection is borrowed from pool. * If BasicDataSource caching is ok, do read-only methods like getNumIdle() and getNumActive() return the right values? * Do I still need to define the Resource () in server.xml and web.xml? * Are there any examples around which uses BasicDataSourceFactory.createDataSource(Properties) to create BasicDataSource? =20 Thanks in advance for the answers,=20 =20 Pramodh. =20 ------_=_NextPart_001_01C57768.B23B9096--