tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seb...@gmail.com
Subject Re: RMI reaper thread prevents JVM from exiting
Date Thu, 03 Feb 2011 16:32:03 GMT
On 27/01/2010 07:43, Thomas Chabaud wrote:
> Le 25/01/2010 20:53, Christopher Schultz a écrit :
>> You've reached way beyond my understanding of RMI at this point. Is it
>> possible that, like JNDI, you might have trees of objects instead of
>> just a flat list? In that case, you'd have to recursively
>> unexport/unbind objects to make sure you got everything.
>>
>
> Thanks for the advice. I've checked, and I think all objects are already
> unexported,
> because on each unexportObject() call the NoSuchObjectException is raised.

JMeter has the same problem when shutting down the client when used in 
client-server mode (which use RMI).

I've just discovered this thread, and have tried all the suggestions 
(unexporting and unbinding).

Nothing worked - apart from System.exit().

However, I then tried calling interrupt() on the RMI Reaper thread:

 >>>>>>>
for(Thread t : Thread.getAllStackTraces().keySet()){
     if ("RMI Reaper".equals(t.getName())) {
         t.interrupt();
     }
}
<<<<<<<

This seems to solve the problem for JMeter, at least on Java 1.6.0_23 on 
Win/XP.

The code is a bit of a hack, as it relies on being able to access the 
threads and that the thread name does not change (though one could just 
interrupt all the threads).

But it may help someone.

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


Mime
View raw message