Two Laptop Bag
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Server mode at GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "Server mode at GUI" Watch "Server mode at GUI" New topic
Author

Server mode at GUI

Anayonkar Shivalkar
Ranch Hand

Joined: Dec 08, 2010
Posts: 671

Hi,

There are 3 modes expected : server, client, standalone.

When I run my application in server mode, should I provide client facilities (like reserve record, find record etc.), or should I only provide facility to configure, start and stop server?

Also, once a server is started and clients are connected to it, what will happen when server is shut down? How should clients behave? (of course, they won't be able to call any method on remote object, so I guess catching those exceptions might be a good option here).


Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD)
Sean Keane
Ranch Hand

Joined: Nov 03, 2010
Posts: 581

Anayonkar Shivalkar wrote:should I only provide facility to configure, start and stop server?


Yes.

Anayonkar Shivalkar wrote:so I guess catching those exceptions might be a good option here).


Yes. You would want to handle the exception in some manner and present and user friendly message to the end user. You might not be able to tell the user that the server is down - but you could provide some sort of generic message.


SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 3820

Sean Keane wrote:but you could provide some sort of generic message.

That's what I did too.


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
 
 
subject: Server mode at GUI
 
Threads others viewed
gui clients can lock same record
Multiple Instances of Standalone
About stop the RMI server
how to lock or unlock another Processes
Database Locks
developer file tools