You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Philipp Leusmann <ph...@post.rwth-aachen.de> on 2003/09/24 13:45:06 UTC

destroy() is not called when Context is reloaded

Hi,

I use a servlet as a chat-server which uses a blocking doGet()-method. (I am
using the chat-server-example from the book "Java Servlet Programming").
To make sure the context can be reloaded I included the destroy()-method in
the servlet to remove all locks.
The problem is, that the destroy()-method is not called (It should log a
message).
Is this due to the blocking doGet()? Is there a way to set a timeout when
the destroy()-method should be called no matter the request-handling is done
or not?
I think I waited for 10 minutes or so, but destroy() wasn´t called.
BTW, I am using Tomcat 4.0.6 (The one integrated into Netbeans).
Is there a way to gracefully close the servlet? As far as I can see it
cannot be done in the ContextListener since the servlets are closed before
the ContextListener is called.

Would be great if someone could help me.

thanks,
 Philipp



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org