Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 80594 invoked from network); 22 Jan 2010 16:56:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Jan 2010 16:56:27 -0000 Received: (qmail 13469 invoked by uid 500); 22 Jan 2010 16:56:23 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 13395 invoked by uid 500); 22 Jan 2010 16:56:22 -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 13384 invoked by uid 99); 22 Jan 2010 16:56:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2010 16:56:22 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of peter.crowther3@googlemail.com designates 209.85.219.223 as permitted sender) Received: from [209.85.219.223] (HELO mail-ew0-f223.google.com) (209.85.219.223) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2010 16:56:12 +0000 Received: by ewy23 with SMTP id 23so688412ewy.24 for ; Fri, 22 Jan 2010 08:55:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=A182QRLPVXCzbYB73aoJglC30YXyImauSF/ons/mlMI=; b=HjaPZdg99Dg7LlNybXiG3fm7wPGrqKGIWWFaeVF0GlikBYdBdOFXCqf2qBVzDFAMAg rkA58SeY44qVIigCINW/xPYwmlkZ+HROd3EVA73oFF2u2Mb+4VODdV9QKM3CtI4ft6/H GvJQwGIYjEb1lvG0i6sZReLalgyEAekZlYtEc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=cetJ2kkKMxLScxyiVLS3G0MinH7hFkVdON7dzYS+kpm05K5GSGBhETcuw8ug5TAdYd YLffui6B54KP1PjLVBPxNAYgum6EMnuQL/wkbo/yDrH7CrEN8ebFAxLMPfH6oXeDhXey I14B7Dd9Cqy5ZVvbhnQwxShwTfPM6xIT2ydfI= MIME-Version: 1.0 Sender: peter.crowther3@googlemail.com Received: by 10.216.91.5 with SMTP id g5mr1190404wef.168.1264179351699; Fri, 22 Jan 2010 08:55:51 -0800 (PST) In-Reply-To: <4B59D17D.20802@agora.msa.fr> References: <4B59D17D.20802@agora.msa.fr> Date: Fri, 22 Jan 2010 16:55:51 +0000 X-Google-Sender-Auth: 58f50a76b6891e5c Message-ID: Subject: Re: RMI reaper thread prevents JVM from exiting From: Peter Crowther To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 2010/1/22 Thomas Chabaud : > I have a problem with a webapp using RMI. When I try to shutdown Tomcat > instance, the JVM doesn't exit. > I have called jstack to see the thread dump : > > http://pastebin.com/fa55647 > > There is a non-daemon thread : "RMI Reaper". > > I've tried to add a servlet context listener to force RMI Object unexport on > shutdown, but it has no effect : > > http://pastebin.com/f324201e2 > > I'm using Tomcat 6.0.18 on a Red Hat Enterprise Linux Server release 5.3. > The JVM is a 64 bit JVM, version 1.6.0_07-b06 on a Intel Xeon E5420 CPU. > > What can I do to force this RMI reaper thread to stop ? If you know you're about to exit the process, then one nasty trick would be to find the thread in your context listener and *set* it to be a daemon thread. An ugly hack, but it might just work! - Peter --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org