Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 50677 invoked from network); 14 Apr 2005 13:48:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Apr 2005 13:48:40 -0000 Received: (qmail 71418 invoked by uid 500); 14 Apr 2005 13:47:05 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 71372 invoked by uid 500); 14 Apr 2005 13:47:05 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 71358 invoked by uid 99); 14 Apr 2005 13:47:05 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.dsg.vertisinc.com (HELO mail.dsg.vertisinc.com) (63.103.126.135) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 14 Apr 2005 06:47:03 -0700 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: DBCP package BasicDataSource question Date: Thu, 14 Apr 2005 08:46:50 -0500 Message-ID: <34385CBC5E8E664EB0007814636AB36A0316D485@exchange1.dimensions.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: DBCP package BasicDataSource question Thread-Index: AcVA+GiFmyjnVXdvRryFjkNoWVkQjA== From: "Scott Purcell" To: X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, I finally figured out last night how to obtain a DataSource object in a = class, and set enough properties to get a connection: BasicDataSource ds =3D new BasicDataSource(); ds.setDriverClassName("com.mysql.jdbc.Driver"); ds.setUsername("javauser"); ds.setPassword("javadude"); ds.setUrl(connectURI); then I get a Connection like so: Connection conn =3D ds.getConnection() I am good with all of this, and it works. Now where I am baffled is, = where is the pool of connections. Did this create a pool? I know I had = to set the commons-pool.jar in my path to get it to run. So does this = class create a pool in the background? And if so, do I need to run a = thread to shut them down? I am looking at the BasicDataSource javadocs = and I see some methods like such: setInitializeSize(int size) setDefaultAutoCommit(boolean val) etc. But I am not sure which ones are for cleaning up "lost" or "dead" = connections, etc. And would this simple configuration work for a simple = web application? Any input would be appreciated. Thanks, Scott K Purcell --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org