It's not a secret anymore!
The moose likes Distributed Java and the fly likes RMI Servers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI Servers" Watch "RMI Servers" New topic

RMI Servers

Senthil Paramasivam

Joined: May 02, 2001
Posts: 7
I am looking for some help...
1. How can a RMI Server shutdown gracefully ?
2. Has anybody used License servers like Flexlm ( for Licensing the RMI Servers ?
Dave P

Joined: Jun 05, 2001
Posts: 8
Try checking out the java techtip at this url:
Life Cycle of an RMI server.
Does anyone know how to force Tomcat 4.1 to shutdown the RMI framework? I have a lot of RMI threads that don't shutdown after I shut down my RMI context listener. It just uses the Naming Class. I do an unbind() and then my thread dies successfully, but tomcat seems to leave the RMI context running.
Dave P

Joined: Jun 05, 2001
Posts: 8
Here are the threads tomcat leaves running:
org.apache.catalina.startup.Bootstrap at localhost:5442
System Thread [Finalizer] (Running)
System Thread [Reference Handler] (Running)
System Thread [Signal Dispatcher] (Running)
System Thread [RMI TCP Accept-0] (Running)
Thread [Thread-2] (Running)
System Thread [RMI Reaper] (Running)
System Thread [GC Daemon] (Running)
System Thread [RMI LeaseChecker] (Running)
Thread [Thread-3] (Running)
Thread [Thread-6] (Running)
Thread [DestroyJavaVM] (Running)
System Thread [RMI TCP Connection(12)-] (Running)
Dave P

Joined: Jun 05, 2001
Posts: 8
Okay, I figured it out myself. I put a System.Exit(0) in my contextlistener class when tomcat tells it to shutdown.
contextDestroyed(ServletContextEvent event) {
I agree. Here's the link:
subject: RMI Servers
It's not a secret anymore!