Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 21865 invoked from network); 7 Nov 2005 03:37:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Nov 2005 03:37:45 -0000 Received: (qmail 12762 invoked by uid 500); 7 Nov 2005 03:37:30 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 12749 invoked by uid 500); 7 Nov 2005 03:37:30 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 12738 invoked by uid 500); 7 Nov 2005 03:37:30 -0000 Delivered-To: apmail-jakarta-tomcat-user@jakarta.apache.org Received: (qmail 12735 invoked by uid 99); 7 Nov 2005 03:37:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Nov 2005 19:37:30 -0800 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_BOGUSMX,DNS_FROM_RFC_POST,HTML_FONT_FACE_BAD,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [202.66.82.230] (HELO smtp.mail.hket.com) (202.66.82.230) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 06 Nov 2005 19:37:23 -0800 Received: (qmail 3879 invoked from network); 7 Nov 2005 03:36:39 -0000 Received: from unknown (HELO IBM1048BF2B560) (172.26.15.10) by smtp.mail.hket.com with SMTP; 7 Nov 2005 03:36:39 -0000 Message-ID: <00dd01c5e34c$68df2000$0a0f1aac@IBM1048BF2B560> From: "Augmentin" To: "Tomcat Users List" Subject: how to stop user app daemon threads in tomcat webapps? Date: Mon, 7 Nov 2005 11:36:16 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00DA_01C5E38F.76ED0340" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_NextPart_000_00DA_01C5E38F.76ED0340 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi, I found that the daemon threads created by my Tomcat webapp won't = automatically stop when the webapp itself is stopped or = undeployed/redeployed. As Tomcat itself is a java application there will always be user threads = in the jvm even when your webapp is stopped.. which makes the daemon = threads spawned by webapps never stop. I tried to add a finalize() method to a main object in the webapp to = interrupt the daemon threads but it didn't seem to work... the timing of = call to finalize() is undetermined, only when it performs garbage = collection. And many times it seemed that when my webapp is = stopped/reloaded/undeployed/redeployed the objects were just not = properly finalized or garbage collected at all. I am using Tomcat 5.5.9 on Windows XP Pro and Solaris 2.6. Thank you for your help. Raymond. ------=_NextPart_000_00DA_01C5E38F.76ED0340--