Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 85739 invoked from network); 28 Jul 2003 14:13:24 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 28 Jul 2003 14:13:24 -0000 Received: (qmail 24383 invoked by uid 97); 28 Jul 2003 14:15:59 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 24376 invoked from network); 28 Jul 2003 14:15:59 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 28 Jul 2003 14:15:59 -0000 Received: (qmail 84074 invoked by uid 500); 28 Jul 2003 14:13:04 -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 84057 invoked from network); 28 Jul 2003 14:13:03 -0000 Received: from services01.hh02.uptime.de (HELO mail01.hh02.uptime.de) (62.67.60.3) by daedalus.apache.org with SMTP; 28 Jul 2003 14:13:03 -0000 Received: (qmail 13915 invoked from network); 28 Jul 2003 14:13:02 -0000 Received: from unknown (HELO server01.hh.uptime.de) (postmaster@uptime-isc.de@212.202.153.225) by services01.hh02.uptime.de with SMTP; 28 Jul 2003 14:13:02 -0000 Subject: RE: mysql connection pool MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Mon, 28 Jul 2003 16:13:01 +0200 content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: mysql connection pool Thread-Index: AcNVER7abJY8794aR7+jh3dv1mgTcQAADQqw From: "Ralph Einfeldt" To: "Tomcat Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N That doesn't happen under java. You have to explicitly free/close all resources that are more valuable than memory (file handles,=20 db connections, ...) The finalizer is called by the garbage collector, which in turn can run any time or not even at all (if you don't consume enough memory). >From the JavaDoc: finalize(): Called by the garbage collector on an object when=20 garbage collection determines that there are no=20 more references to the object. > -----Original Message----- > From: Hans Wichman [mailto:hans@trimm.nl] > Sent: Monday, July 28, 2003 4:03 PM > To: tomcat-user@jakarta.apache.org > Subject: mysql connection pool >=20 >=20 > Hi, > does anyone know why I have to close the connection retrieved=20 > from a mysql database connection pool ? > Isn't the connection returned to the pool automatically when=20 > the object goes out of scope? >=20 > And why is the datasource.getNumActive() value always 0 even=20 > though I have=20 > multiple connections open ? >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org