File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes new to RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "new to RMI" Watch "new to RMI" New topic

new to RMI

naveen chinthakunta

Joined: Sep 26, 2005
Posts: 16
Hi all,

I am pretty new to RMI and I have a trivial question. Is it necessary that all the server code has to be implemented from an interface? I went through some sample code and all seem to be doing the same. Is it just a standard or it has to be done like that. Plz help clearing the doubt.

Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Yes, you design an interface that extends the Remote interface, and then implement that interface in your server. It's required so that both the stub and the actual implementation provide the same methods.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
It is sorta covered in the JavaRanch Style Guide.
subject: new to RMI
Similar Threads
RMI and object and thread sharing
Java 1.5 and Dynamic Stub Generation
three questions about java RMI
confused about remote object
weird behaviour of singleton pattern in rmi call