tomcat-users mailing list archives

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

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

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)
>[mailto:NSudhakar@chn.cognizant.com]
>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
and
>Stop the Tomcat, The older mgr object seems to be still in the JVM and
this
>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
Destroyed
>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
>sudhakar



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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message