tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Einfeldt" <>
Subject RE: mysql connection pool
Date Mon, 28 Jul 2003 14:13:01 GMT
That doesn't happen under java.

You have to explicitly free/close all resources
that are more valuable than memory (file handles, 
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:

Called by the garbage collector on an object when 
garbage collection determines that there are no 
more references to the object.

> -----Original Message-----
> From: Hans Wichman []
> Sent: Monday, July 28, 2003 4:03 PM
> To:
> Subject: mysql connection pool
> Hi,
> does anyone know why I have to close the connection retrieved 
> from a mysql  database connection pool ?
> Isn't the connection returned to the pool automatically when 
> the object goes out of scope?
> And why is the datasource.getNumActive() value always 0 even 
> though I have 
> multiple connections open ?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message