• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dead references in the RMI registry

 
Ctirad Kr�l�k
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 291
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a word, no.

What you are doing is the only way.
 
Ctirad Kr�l�k
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the only way to determine whether the reference is "alive" is to call some remote method and catch exceptions?
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.
It's just a repository.
 
Ctirad Kr�l�k
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
;(

Thank you for your answer
C.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic