aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Decoupling client and server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Decoupling client and server" Watch "Decoupling client and server" New topic
Author

Decoupling client and server

Chiji Nwankwo
Ranch Hand

Joined: Jun 21, 2002
Posts: 56
Hi,
Could you please tell me what techniques you used to decouple the client side from the server side of the application. For instance, if the server shuts down while the client is still connected, how do you notify the client the server is no longer available? How does the client recover from that scenario?
Please let me know what you think.
Thanks,
Chiji


SCJP, SCJD, SCWCD<br />"Meekness is not weakness, but power under control"
Chiji Nwankwo
Ranch Hand

Joined: Jun 21, 2002
Posts: 56
Hi,
I am resending my previous message. Please respond.

Could you please tell me what techniques you used to decouple the client side from the server side of the application. For instance, if the server shuts down while the client is still connected, how do you notify the client the server is no longer available? How does the client recover from that scenario?
Please let me know what you think.

Thanks,
Chiji
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
Hi Chiji,
Generally, you want an intermediary class, say a controller or a delegator, that acts as an emissary between your server and the gui. If you use RMI, a non connected server will throw an RMI exception when you request service from it(or, to be precise, RMI does). Your intermediary class can catch that exception. Once that's done, the intermediary can log the error and can throw a 'friendly' gui exception for the gui layer. My book actually digs into this pretty deeply.
HTH,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
[ July 24, 2002: Message edited by: Max Habibi ]

Java Regular Expressions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Decoupling client and server