File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Handling remote exception Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "Handling remote exception" Watch "Handling remote exception" New topic
Author

Handling remote exception

luis veron
Ranch Hand

Joined: Mar 07, 2001
Posts: 35
Hello,
Currently, I am in the process of sorting out my "exception handling" in my assignment. Just wan't to asked you guys on how did you handle remote exceptions. I have just read the RMI specs and noticed that there were a lot of exception hat can happen my invoking a remote method/invocations. Do you just display a message to the client that there were some problem connecting (and need to try again later) or do you just "halt" (Syste.exit()) the apps. Is there a better way to solve this kind of scenario?
I really appriciate your reply.
Luis
Aleksey Matiychenko
Ranch Hand

Joined: Apr 03, 2001
Posts: 178
I don't think halting the client application is ever a good idea.
I am going to display a message box that indicates a ptoblem and gives user some option. For example you can offer a user to switch to a local mode if you cannot connect to remote database. Or give a user an option to print data for future reference and then exit the application.

luis veron
Ranch Hand

Joined: Mar 07, 2001
Posts: 35
Thanks Alek!
Yeah, I think you're right that halting the client apps is not a good idea. But I think the users should be informed also that the connection is closed (cut), something like that so that they will not try to request a search/booking.
Just my thought.
Luis
 
 
subject: Handling remote exception
 
Threads others viewed
catch Throwable
Why extend RuntimeException?
Robust Java: TOC?
design issue: throwing generic exceptions? why?
How to catch an exception thrown from a message invoked during instance variable initialization ?
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture