Howdy,
Keep track of them by holding the references as member variables
somewhere, typically a singleton.  Call close() on the singleton, which
in turn calls interrupt() on each one of the threads.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Frank Lawlor [mailto:[EMAIL PROTECTED]
>Sent: Monday, March 10, 2003 1:45 PM
>To: 'Tomcat'
>Subject: RE: How to listen for shutdown
>
>Thanks for all the responses.
>
>
>
>I have another question about shutdown.
>
>
>
>My app has several asynchronous threads which it spins off.  I need to
>get them shut down cleanly.
>
>
>
>These threads are not servlets and if I add a listener spec to web.xml
>for them I get the startup message:
>
>
>   2003-03-10 12:30:47 StandardContext[]: Error configuring application
>listener of class com.foo.bar.RequestQMgr
>
>java.lang.InstantiationException: com.foo.bar.RequestQMgr
>
>.
>
>
>
>Even tho I can have my servlet communicate with the thread, it seems
>like Tomcat is busy shutting these down
>even before my contextDestroyed() method finishes.
>
>
>
>What is the proper way of shutting down these threads cleanly without
>Tomcat killing them first?
>
>
>
>  -- Frank




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to