tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Stor <mar...@frightanic.com>
Subject Tomcat reload / classloader / connection pool
Date Tue, 02 Dec 2003 23:33:43 GMT
Hi,

I'm using my own SQL framework with a Singleton ConnectionFactory that
holds a reference to the ConnectionManagers (connection pools) for
various DB connections. It all works great in a non-web environment.

The problems with Tomcat occur upon reload of the web app. The
classloader reloads the whole app and all my DB connections get opened
again. This wouldn't cause much pain if the existing connections were
garbage collected i.e. finalized. This doesn't happen and after a couple
of reloads the DB's max connections limit is reached...

First of all, why is this so?
Second of all, how can I prevent this? Somehow listen for reloads and
react appropriately?

Instead of deploying the framework JAR in the web app's WEB-INF/lib
directory I could place somewhere in the regular CLASSPATH, but then all
web apps would have access to the same ConnectionFactory :-((

Hope you can help
Marcel


---------------------------------------------------------------------
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