tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject No destroy() method called on Tomcat 5.0.24 shutdown
Date Thu, 10 Jun 2004 12:50:04 GMT

During the shutdown sequence of my Web Application I would like to have some code executed.
I implemented the destroy() method of a Servlet and implemented a ServletContextListener.

Both of these get called when the application is reloaded.
But neither of these is called when I shutdown Tomcat.

Shouldn't these methods get called no matter how the servlet is being taken out of service:

Called by the servlet container to indicate to a servlet that the servlet is being taken out
of service. This method is only called once all threads within the servlet's service method
have exited or after a timeout period has passed. After the servlet container calls this method,
it will not call the service method again on this servlet.

This method gives the servlet an opportunity to clean up any resources that are being held
(for example, memory, file handles, threads) and make sure that any persistent state is synchronized
with the servlet's current state in memory. </quote>

I am using Tomcat 5.0.24
This is on Windows 2K/XP
Using And controlling Tomcat using the Tomcat Monitor.


Johan Philippe
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message