Hi all-

I have a web application that uses some static resources to make them available to any 
class in the application.  Amongst these static resources is a home-brewed JDBC 
connection pool.  What I'm seeing is that with Tomcat 4, when I stop/start or reload 
an application from the manager app, it isn't freeing up these static resources.  I 
can see this because my memory utilization goes up about 5 megs every time I restart, 
whereas if I stop and restart the whole tomcat process, my memory stays the same.  
Also the database starts yelling at me about too many applications simultaneously etc.

How can I tell Tomcat to clean up these resources when it stops the application? What 
hook/mechanism is there?  Is there some sort of listener interface I can implement, 
similar in idea to an HttpSessionBindingEvent, to let me know when an application is 
shutting down so I can close all of the database connections?

None of this was an issue in Tomcat 3.x because I had no choice but to shut down the 
entire tomcat instance!

Any help greatly appreciated!  Thanks!

Best regards,

Richard

Reply via email to