Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 27025 invoked from network); 17 Jan 2003 14:59:22 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 17 Jan 2003 14:59:22 -0000 Received: (qmail 12057 invoked by uid 97); 17 Jan 2003 13:54:25 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 2515 invoked by uid 97); 17 Jan 2003 13:49:29 -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 14706 invoked by uid 98); 17 Jan 2003 13:40:50 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.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: RE: Tomcat 4.0.x JDBC connection pooling Date: Fri, 17 Jan 2003 09:25:44 +0100 Message-ID: <651BB7AC43FAD24995DA89D32662CEC40515A6ED@ntsviemxs0154.connect.at-work.ent> Thread-Topic: Tomcat 4.0.x JDBC connection pooling Thread-Index: AcK9gRAgk94M6F1DRMO8rHdASOt5kAAgM6GA From: "Roberts, Eric" To: "Tomcat Users List" X-OriginalArrivalTime: 17 Jan 2003 08:25:44.0720 (UTC) FILETIME=[07A41100:01C2BE02] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Yes - We used 4.1.12 and have just migrated to 4.1.18 on a mission = critical 24 x 7 app and we have had no problems - once we got it working = in the first place!! -----Original Message----- From: Luca Cremonini [mailto:luca.cremonini@honyvem.it] Sent: Donnerstag, 16. J=E4nner 2003 18:00 To: Tomcat Users List Subject: RE: Tomcat 4.0.x JDBC connection pooling Thanks Eric! But with Tomcat 4.0.x I don't have things like MaxActive, MinIdle and = other parameters... 4.0 documentation doesn't tell anything about this. It seems to me that I have to migrate to 4.1.x to use the pool and such parameters. Am I right? L.C. = =20 "Roberts, = =20 Eric" Per: "Tomcat Users List" = =20 Oggetto: RE: Tomcat 4.0.x = JDBC connection pooling =20 = =20 16/01/2003 = =20 17.33 = =20 Per favore, = =20 rispondere a = =20 "Tomcat Users = =20 List" = =20 = =20 = =20 Hi Luca, The pool is established in the definition of the resource = jdbc/EmployeeDB - where things like MaxActive, MinIdle and other parameters determine how = the pool behaves. At startup the pool will connect the MinIdle connections to the DB - a = new connection will then only be established if that number are already in = use. It is good practice to always close connections, as otherwise you become dependent on parameters like RemoveAbandoned and RemoveAbandoned = timeout. All of this is discussed in the JNDI Datasource HOWTO in the documention = : -) -----Original Message----- From: Luca Cremonini [mailto:luca.cremonini@honyvem.it] Sent: Donnerstag, 16. J=E4nner 2003 17:17 To: tomcat-user@jakarta.apache.org Subject: Tomcat 4.0.x JDBC connection pooling I'm using JDBC connection with Tomcat 4.0 as shown in Tomcat4.0 online documentation (http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.htm= l ): ----------------------------------------------- // Obtain our environment naming context Context initCtx =3D new InitialContext(); Context envCtx =3D (Context) initCtx.lookup("java:comp/env"); // Look up our data source DataSource ds =3D (DataSource) envCtx.lookup("jdbc/EmployeeDB"); // Allocate and use a connection from the pool Connection conn =3D ds.getConnection(); ... use this connection to access the database ... conn.close(); ----------------------------------------------- I searched the mailing list and the web, but coudn't find answer to these questions: - When I call ds.getConnection(); am I getting a connection from a pool or opening a NEW connection every time? - If there's a pool why do I have to close the connection with conn.close(); instead of releasing it to the pool? - What are the improvement in Tomcat 1.1.x about JDBC connection = pooling? -- To unsubscribe, e-mail: < mailto:tomcat-user-unsubscribe@jakarta.apache.org> For additional commands, e-mail: < mailto:tomcat-user-help@jakarta.apache.org> -- To unsubscribe, e-mail: < mailto:tomcat-user-unsubscribe@jakarta.apache.org> For additional commands, e-mail: < mailto:tomcat-user-help@jakarta.apache.org> -- To unsubscribe, e-mail: = For additional commands, e-mail: = -- To unsubscribe, e-mail: For additional commands, e-mail: