Reputation: 1633
I have the following requirement.
Requirement: verify if the given RMI service object say "xxservice" is running/available on the given host and port using java.
I am using JDK1.6
Appreciate any help.
Thanks
Upvotes: 1
Views: 2557
Reputation: 311039
Just look it up in the Registry, if that's its bound name.
Of course that doesn't prove it's still there. In general the best way to determine whether any resource is available is just to try to use it. In this case, call a method on it. Any technique that tries to predict whether a following use will fail is of course bound to fail itself.
Upvotes: 1