File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes Dead references in the RMI registry Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Dead references in the RMI registry" Watch "Dead references in the RMI registry" New topic
Author

Dead references in the RMI registry

Ctirad Kr�l�k
Greenhorn

Joined: Nov 17, 2008
Posts: 9
Hello

I've got one question. I'm using Java RMI for programming my distributed application. I have one server which is registered in the registry and sometimes I shut down my application incorrectly (I don't unbind this server from the registry)
After it, I run the client, which finds the server's reference in the registry, but when it wants to call some server's method, the exception is thrown because there isn't any server object on the remote machine.

My question is: Is there any possibility how to check the liveness of objects in the registry?
Edward Harned
Ranch Hand

Joined: Sep 19, 2005
Posts: 291

In a word, no.

What you are doing is the only way.


Ed's latest article: A Java Parallel Calamity http://coopsoft.com/ar/Calamity2Article.html
Ctirad Kr�l�k
Greenhorn

Joined: Nov 17, 2008
Posts: 9
So the only way to determine whether the reference is "alive" is to call some remote method and catch exceptions?
Edward Harned
Ranch Hand

Joined: Sep 19, 2005
Posts: 291

Yes.
It's just a repository.
Ctirad Kr�l�k
Greenhorn

Joined: Nov 17, 2008
Posts: 9
;(

Thank you for your answer
C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dead references in the RMI registry