File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes a question about rmi 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 "a question about rmi" Watch "a question about rmi" New topic
Author

a question about rmi

Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
I have a basic rmi question. After I created the stub for the implementation class of remote interface. Do I need this stub class in the client machine? i.e. To make remote invocations, Does the client need a local copy of the stub class? I think only the remote interface is enough for the client, is that true?
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11527
    
100

Hi Peter,
If you do not have the stubs on the client machine, it will try to dynamically download them via RMI.
But you really don't want to do that for the assignment: just package the stubs with the client code and everything will be much easier.
Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Arun Kumar
Ranch Hand

Joined: Aug 29, 2003
Posts: 67
Hi peter,
FOr the client to operate under RMI mode, it needs the following stuff...
The remote interface, the stub and the client class (ofcourse).
The server needs the remote interface, the remote implementation class, the stub and the skeleton. Since our assignment requires us to package all in one jar file, the client and the server part will have access to all the RMI stuff required without any need to dynamically download it.
If not normally we need to have a http server, or ftp server to serve the stub to the client. They call it the codebase ...
If you are interested in RMI, beyond the scope of this project, i would recommend reading Java.rmi by Esmon Pitt & Kathleen McNiff
Arun
[ September 25, 2003: Message edited by: Arun Kumar ]

SCJP (1.4), SCWCD, SCJD
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11527
    
100

Hi Arun,
Skeletons haven't been necessary since Java 1.2.
Regards, Andrew
Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
Thank you guys, I've got it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: a question about rmi