tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun Katkere <>
Subject Hooks for Web application start/stop
Date Tue, 02 May 2000 01:19:24 GMT
Is there any way in TomCat to register for callbacks on Web application
startup and shutdown? With auto-reloading of WAR files, we may end up with
multiple instances of non-servlet classes, and I was wondering if there is
some way to shutdown old classes cleanly.

One solution I can think of is to have a singleton class in the Web app that
is called by init()/destroy() of each of my servlets (and
jspInit()/jspDestroy() of my JSPs), and initialize/destroy my application
when the reference count changes from zero.

There has got to be a cleaner way. Any suggestions?


View raw message