tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Objects using thread on Start/Stop of Tomcat
Date Thu, 08 Apr 2004 12:53:37 GMT

It's funny that you wrote your own thread manager and have to ask this

No, tomcat cannot destroy all your threads and objects referred to from
these threads.  Tomcat can only destroy daemon threads for you.  You
need to take care of the rest by yourself.  A ServletContextListener's
contextDestroyed method is an excellent place to do this: shut down your
thread manager and all your threads, otherwise tomcat's JVM process will
not die.

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Namasivayam, Sudhakar (Cognizant)
>Sent: Thursday, April 08, 2004 2:10 AM
>To: Tomcat Users List
>Subject: Objects using thread on Start/Stop of Tomcat
>hi all,
>	I have a Thread mgr which will create a thread. No if i Start
>Stop the Tomcat, The older mgr object seems to be still in the JVM and
>causes a problem because a new mgr is created and i have two copies of
>threads running simultaneously..
>      Can any one tell me whether all objects will be destroyed if i do
>start and stop of tomcat? Should i do anything in the  Context
>method od context listener?  The older object is null in the context
>destroyed but the thread seems to be alive?
>Configuration : Linux + tomcat 4.0.4 + JDK 1.4
>thanks in advance

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:
For additional commands, e-mail:

View raw message