tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Crowther <peter.crowt...@melandra.com>
Subject Re: RMI reaper thread prevents JVM from exiting
Date Fri, 22 Jan 2010 16:55:51 GMT
2010/1/22 Thomas Chabaud <ext_chabaud.thomas@agora.msa.fr>:
> 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


Mime
View raw message