Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 99294 invoked from network); 25 Feb 2003 15:27:35 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 25 Feb 2003 15:27:35 -0000 Received: (qmail 1460 invoked by uid 97); 25 Feb 2003 15:29:12 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 1453 invoked from network); 25 Feb 2003 15:29:11 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 25 Feb 2003 15:29:11 -0000 Received: (qmail 94273 invoked by uid 500); 25 Feb 2003 15:26:15 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 94210 invoked from network); 25 Feb 2003 15:26:15 -0000 Received: from www.shareowner.com (HELO shareowner.com) (66.46.24.147) by daedalus.apache.org with SMTP; 25 Feb 2003 15:26:15 -0000 Received: from exchange.int.shareowner.com (gw.shareowner.com [66.46.24.163]) by shareowner.com (8.11.6/8.11.6) with ESMTP id h1PF9Y425518 for ; Tue, 25 Feb 2003 10:09:34 -0500 Received: by exchange.int.shareowner.com with Internet Mail Service (5.5.2656.59) id ; Tue, 25 Feb 2003 10:26:17 -0500 Message-ID: From: pqin@shareowner.com To: tomcat-user@jakarta.apache.org Subject: RE: Connection Pooling Date: Tue, 25 Feb 2003 10:26:11 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2DCE2.3A505CE0" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C2DCE2.3A505CE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable This is a Tomcat JNDI implementation. I tried different solutions = Tomcat, Oracle connection caching and commons. Among them, Tomcat's is very = simple. commons-dbcp + pooling require more coding but have more flexibility of course. Regards, =20 =20 PQ =20 "This Guy Thinks He Knows Everything" "This Guy Thinks He Knows What He Is Doing" -----Original Message----- From: Malcolm Green [mailto:Malcolm.Green@kcom.com]=20 Sent: February 25, 2003 5:36 AM To: 'Tomcat Users List' Subject: RE: Connection Pooling I have DBCP connection pooling working as follows using Tomcat 4.1.12: Under the element for your application (this can either be in = the server.xml file or a separate xml file in the webapps dir) I have the following config: factory =09 org.apache.commons.dbcp.BasicDataSourceFactory maxActive 100 maxIdle 30000 maxWait 100 =20 username theUser =09 password thePassword =20 driverClassName =09 com.microsoft.jdbc.sqlserver.SQLServerDriver =20 url =09 jdbc:microsoft:sqlserver://hostname:port;databasename=3DmyDB validationQuery select getdate() This is an MS SQL Server config, but to change the db just make sure = that the requried JDBC jar file is in the common/lib directory and then = change the necessary elements above e.g. driverClassName etc. In my web.xml for my app I have the following: jdbc/XXXX javax.sql.DataSource Container To use the pool I have the following code in a servlet: (I have left = out the try/catch block etc.) Context ctx =3D new InitialContext(); DataSource ds =3D (DataSource)ctx.lookup("java:comp/env/jdbc/XXXX"); conn =3D ds.getConnection(); .... Hope this helps. Malcolm -----Original Message----- From: Sebasti=C2=AAo Carlos Santos [mailto:scarlosantos@bol.com.br] Sent: 21 February 2003 00:15 To: tomcat-user@jakarta.apache.org Subject: Connection Pooling Somebody has some experience or example in the=20 configuration and use of pool of connections with the=20 commons-dbcp. =20 I am a little lost and I don't know through where to=20 begin. =20 All information will be well arrival. =20 I thank the help in advance =20 ________________________________________________________________________= __ E-mail Premium BOL Antiv=EDrus, anti-spam e at=E9 100 MB de espa=E7o. Assine j=E1! http://email.bol.com.br/ --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org ------_=_NextPart_001_01C2DCE2.3A505CE0--