This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI Server" Watch "RMI Server" New topic
Author

RMI Server

Mark Anderson
Greenhorn

Joined: Jun 04, 2002
Posts: 1
Hi,
I'm using RMI. I have defined all public methods from the Data class (not implementation) in the Remote Interface.
I can't extend from the Data class to my Remote server since the server must extend java.rmi.server.UnicastRemoteObject. Is it a good idea to put the server in the Data class??


Mark A
Eduard Jodas
Ranch Hand

Joined: May 14, 2002
Posts: 80
No, since the Data class is used locally and remotely, it's better to use delegation.
I'm applying an Adapter/Proxy pattern: a server class which extends UnicastRemoteObject, implements the DataRemote interface and pass method calls to a Data instance. In addition, the server class deals with remote lock/unlock.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI Server