tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject Re: Killing threads during context restart
Date Tue, 09 Nov 2004 23:04:15 GMT
From: "TK Banks" <>
> I guess I don't even know what a context is, but I
> assumed that a context restart would kill off all
> application threads.  How am I supposed to get all my
> application threads to die when the context restarts?

What about creating a ServletContextListener?  With that you will be
notified when the context is initialized and destroyed, and you have the
opportunity to start and stop your background process.

I think, though, that you're officially discouraged from starting additional
threads... at least that's the impression I've always gotten.  I looked in
the specification, and found that containers are allowed to restrict you
from creating Thread objects, (Servlet 2.3, SRV.1.2) though I don't think
Tomcat does.

Wendy  Smoak

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message