Does not anyone have a solution how to determine if a registry is running a specific host and port.
LocateRegistry.createRegistry(port) --- works LocateRegistry.getRegistry(host, port) ---- does not tell me much
What I want to do is that if a user starts a registry on a specific host and port and if another user want to start a registry on the SAME host and port, I want to bypass the the creation of the remote object and binding it to the registry.
Otherwise, I am going to get an AlreadyBoundExeption.
if (LocateRegistry.getRegistry(host, port)==null) --- should work but it does not
posted 10 years ago
catch the exception. If you reach the catchblock the registry was already there, if not it wasn't