I am thinking this starts the registry in that JVM-process if none was running before. If so I see the solution being to run a registry hosting process, separate from my multiple server apps. This is not unfeasible, but complicates the setup a bit...
reg = LocateRegistry.getRegistry(port);
I am thinking this starts the registry in that JVM-process if none was running before.All that LocateRegistry.getRegistry() does is construct a RegistryStub according to the parameters you provide. It doesn't even perform any network operations. If the parameters you provided are incorrect you won't find out until you try to use it. So if you are trying to create a Registry if not found, you have to try the createRegistry() first, and if that fails, do the getRegistry(). Not the other way around.
I'd naively consider the getRegistry(port) lookup equivalent to createRegistry fail while some other VM is hosting one on the localhost, requiring the same "network probing".Reviving this ancient thread to note that getRegsitry(port) isn't a lookup, and doesn't do anything to the network, as had already been stated above, so the entire argument falls over.