GeeCON Prague 2014*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Exception handling on server side. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Exception handling on server side." Watch "Exception handling on server side." New topic
Author

Exception handling on server side.

Abhinav Anand
Ranch Hand

Joined: May 02, 2002
Posts: 113
Hi guys,
Exception handling has 8 points under server design marking scheme.
In my views the exceptions thrown by the server should get categorised under
on super exception so that the client does not has to catch 10 different types
of exception while passing a single remote call.
Any suggetions..
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Yes but what happens when there is an Exception thrown by the server when you are starting up the server, like it can't finds the db.db file. At this point there is no such thing as a client. No one is connected to the server. So in this case the server has to handle the Exception. hence the 8 points.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Abhinav Anand
Ranch Hand

Joined: May 02, 2002
Posts: 113
Hi,
Actually I am not doing anything specific about the server excetion handling. So, i felt like asking if anybody had done anything special about it.
Thanks,
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

On mine I had a GUI for my server, and then I displayed Exceptions like I did in the client, displayed a JDialog with a nice message.
The server GUI is not necessary, but I liked that I could start and end the registry without the user having to type anything in a command line.
Mark
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

Actually I am not doing anything specific about the server excetion handling. So, i felt like asking if anybody had done anything special about it.

I created a ServerException class and mapped the server exceptions on server start up to that class. If an exception occurs, a meaningful message is displayed to the client:
 
GeeCON Prague 2014
 
subject: Exception handling on server side.