I am having trouble with RMI shutdown.
My application has several components which use RMI. Spring (1.1.5) starts up first and does LocateRegistry.createRegistry(). On shutdown RmiServiceExporter.destroy() does following:
registry.unbind(this.serviceName); UnicastRemoteObject.unexportObject(this.exportedOb ject, true);
However it does not do UnicastRemoteObject.unexportObject( Registry, true ). As a result my app does not shutdown and netstat shows that RMI is listening on its port.
Possible solution:
I am not sure if this is inline with design, but simple solution is to have RmiServiceExporter remember if it created registry, and remove it in destroy.
Thank you.


Reply With Quote