tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Harper" <rob...@iat-cti.com>
Subject RE: threads in tomcat
Date Thu, 16 Jun 2005 16:45:22 GMT
You should hold a reference to your thread in your app. Set a flag that the
thread watches to notify it that it is time to terminate. Place this code in
the servlet's destroy() body. Calling the destroy() on the thread object is
a little drastic because it will terminate the thread without calling
cleanup methods. Thread.stop() is deprecated because it does not clean up
well either.

Robert S. Harper
Information Access Technology, Inc.

-----Original Message-----
From: Daniel Molina (Inter-Media) [mailto:dmolina@inter-media.cl] 
Sent: Thursday, June 16, 2005 10:29 AM
To: Tomcat Users
Subject: threads in tomcat

Hello,

   If I use threads, through the Thread class, how can I can finish them
whenever Tomcat reloads the application that created them.

   Thanks.

Regards.
Daniel Molina Wegener

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org





---------------------------------------------------------------------
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