This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Implementation of remote/local mode communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Implementation of remote/local mode communication" Watch "Implementation of remote/local mode communication" New topic
Author

Implementation of remote/local mode communication

James Clinton
Ranch Hand

Joined: Jun 23, 2003
Posts: 190
Hi

Please discuss my implementation of remote/local mode communication.

Currently the way I have implemented this is as follows, the client side filters a request through to a BrokerCommand class which decides

(a) in remote mode, calls a function from the BrokerServices interface, which then calls my Broker Class which calls my data methods (in a nutshell)

or the command class

(b) in local mode, calls the Broker business method directly which then connects to the Data class blah blah..

This results in code (below) in every method in the command class. Its not very elegant:



Is there a better way?

Cheers
James
[ December 15, 2004: Message edited by: James Clinton ]
James Clinton
Ranch Hand

Joined: Jun 23, 2003
Posts: 190
I have just thought of another option. Have 2 types of command which extend a parent command which can be passed in the GUI on construction.











Please discuss and share your approach/problems/recommendations.

Thanks!
[ December 15, 2004: Message edited by: James Clinton ]
 
jQuery in Action, 2nd edition
 
subject: Implementation of remote/local mode communication
 
Similar Threads
Locking/Unlocking, -- Am I Done Or I Don't Understand Requirements?
Is this the proxy pattern?
Happy Days are Here. Finally. 151 :)
ClientData problem
FBN: RMI Server Design