RE: Objects using thread on Start/Stop of Tomcat

2004-04-12 Thread Namasivayam, Sudhakar (Cognizant)

Thanks Yoav,

sudhakar


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 08, 2004 6:24 PM
To: Tomcat Users List
Subject: RE: Objects using thread on Start/Stop of Tomcat



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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

Visit us at http://www.cognizant.com

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

RE: Objects using thread on Start/Stop of Tomcat

2004-04-08 Thread Shapira, Yoav

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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]