Hi
This is from javadoc spec of java.rmi.registry.LocateRegistry
<p> Note that a <code>getRegistry</code> call does not actually make a
* connection to the remote host. It simply creates a local reference to
* the remote registry and will succeed even if no registry is running on
* the remote host. Therefore, a subsequent method invocation to a remote
* registry returned as a result of this method may fail.
I'm doing like this : to be sure that a rmi registry runs on a host , on the registry obtained by the call
, I call a convenience method, for example
.
If I have no exception, I assume that the registry is running. If there is no registry running, invoking this method will throw an exception.
I'm not very happy with this solution. Does anybody has some better idea ?