This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes When the remote interface instance is lost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "When the remote interface instance is lost" Watch "When the remote interface instance is lost" New topic
Author

When the remote interface instance is lost

Lucas cotta
Greenhorn

Joined: Oct 10, 2011
Posts: 21
Hi all!!

I'm almost finishing my project, but I've just produced this error, and I don't know how to handle it...
Suppose my GUI for network client mode, calls a controller class that has an instance of the remote interface.
It is everything working fine, then I shutdown the server. If I try any operation in the client an error will be displayed. Ok.

But now, (without closing the client GUI) I start the server again. I should be able to search normally in the client GUI, but when I try to search, an error is displayed because the remote interface instance that this client was using is lost...
What should I do in such situation?

Only thing I can think now is to suggest the user to restart the application...

Thanks!!!
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5216
    
  12

I don't see the problem. It's normal behavior because the server was down, so the connection the client uses to talk to the server has become invalid. Just show a similar error message as when the server is down. And I would keep the error message general, because you can't really know what went wrong (I used something like "A network problem has occured. ..."). That's it!


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Lucas cotta
Greenhorn

Joined: Oct 10, 2011
Posts: 21
Ok, I'll keep the general message for remote exception, and I will explain in the user guide that this may happen...
thank you!! now i've finished! ;)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: When the remote interface instance is lost