aspose file tools*
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
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
 
Similar Threads
UniCastRemoteObject
The RMI Data Access Conundrum
Adapter pattern for RMI
Passed with a 142
NX:contractor - stubs