tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Einfeldt" <ralph.einfe...@uptime-isc.de>
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:

finalize():
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 [mailto:hans@trimm.nl]
> Sent: Monday, July 28, 2003 4:03 PM
> To: tomcat-user@jakarta.apache.org
> 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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message