This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Automatically reconnect to server ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Automatically reconnect to server ?" Watch "Automatically reconnect to server ?" New topic

Automatically reconnect to server ?

Liviu Carausu
Ranch Hand

Joined: Oct 07, 2004
Posts: 157
I have tested my application in the following way : I have stopped the server (unexport the RMI object from the registry). The client had in this way a invalid reference to the remote object. After restarting the server and publishing the object with the same name, the client reference was still not valid and ,of course, any further request using the invalid reference failed.
But, anyway, the server was running and I have the situation that the client was invalid.
Do you think that some logic to obtain a new reference to the exported rmi object is needed or this is beyond the scope of the application ?

Oracle Certified Master Java SE6 Developer(SCJD),
OCE JEE 6 JSP and Servlets Developer.
Romeo Son
Ranch Hand

Joined: Mar 12, 2007
Posts: 92


I think it is beyond the scope of the assignment.

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

Hi Liviu

I also think that will be to much. You can (must) document this and you can provide a reconnect feature for the client and let the user to decide to reconnect or not.At list this is what I have done.

[ June 13, 2007: Message edited by: Mihai Radulescu ]

Maciej Miklas
Ranch Hand

Joined: Feb 12, 2007
Posts: 61
no, I do not do it.

I agree. Here's the link:
subject: Automatically reconnect to server ?
Similar Threads
Add RMI Interface to Existing Application
Keep reference to stub or use RMI registry?
RMI Client-Server Applications
In-memory java object compression ...
RMI Client-Server Applications