How to stop the registry without JVM restart
Hi,
I have a question about the Registry object. In my project, custom RMIClient/ServerSocketfactories are used (a wrapper to SSL), and a few components (distributed) have their own registries. These applications read their config files from XML documents. One of the parameters in the config files are keystore locations and passwords for these keystores. These applcations offers a simple CLI interface allowing to execute a few commands (like q - quit, r - restart and such).
Now when I type the 'r' option so the application can restat and parse it's configuration file again, there is a possibility that some value related to the socket factories (keystore location or password) has changed. In that case, the registry created by CreateRegistry is no longer valid since it uses socket factories that are based on the old parameters.
What I want to achieve is to stop the existing registry and create a new one (I'm not using the rmiregistry deamon). Of course I cannot simply create new registry cause then I'd get an internal error (ObjID already in use). I safely unbind all existing objects and unexport objects for which there can possibly be any references, but still I need to stop the entire registry and start a new one. I'd like to know if this is possible at all (via some deep Java guts?) without restarting the whole JVM?
thanks,
owczi

