Thanks all.  I have the threads dying cleanly now.

--- Filip Hanik - Dev <[EMAIL PROTECTED]> wrote:

> you can setup context listeners, and when the
> context is stopped you will receive an event and can
> stop your bg thread
> 
> Filip
> ----- Original Message ----- 
> From: "TK Banks" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 09, 2004 4:40 PM
> Subject: Killing threads during context restart
> 
> 
> I have a background thread object in my tomcat
> application that performs some garbage-collection
> like
> functions (i.e., wakes up periodically and does some
> application specific cleanup).  I have tomcat
> configured to "restart the context" when I drop new
> class files in the WEB-INF/classes directory. 
> Recently I have discovered multiple copies of my
> these
> background threads running simultaneously.  Further
> investigation has shown that I get an additional
> copy
> with each context restart.
> 
> 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? 
> Checking instance variables don't work since the
> data
> from the old context and the new does not appear to
> be
> shared.
> 
> Thanks much,
> Matt
> 
> 
> 
> __________________________________ 
> Do you Yahoo!? 
> Check out the new Yahoo! Front Page. 
> www.yahoo.com 
>  
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



                
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to