Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 98967 invoked from network); 16 Jun 2005 16:46:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Jun 2005 16:46:59 -0000 Received: (qmail 80465 invoked by uid 500); 16 Jun 2005 16:46:40 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 80427 invoked by uid 500); 16 Jun 2005 16:46:40 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 80314 invoked by uid 99); 16 Jun 2005 16:46:39 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from mail-10.integraonline.com (HELO mail.integraonline.com) (204.130.255.172) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 16 Jun 2005 09:46:39 -0700 Received: (qmail 10138 invoked by uid 5513); 16 Jun 2005 16:45:26 -0000 Received: from unknown (HELO rd2) (?pbs?keith.iat-cti.com@208.46.68.194) by 0 with SMTP; 16 Jun 2005 16:45:26 -0000 From: "Robert Harper" To: "'Tomcat Users List'" , "'Daniel Molina \(Inter-Media\)'" Subject: RE: threads in tomcat Date: Thu, 16 Jun 2005 10:45:22 -0600 Keywords: Tomcat Users Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 In-Reply-To: <001e01c57290$7cfe12d0$4c00a8c0@dmolina> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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