Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a question about rmi

 
Yuan Ye
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 11865
194
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Arun Kumar
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11865
194
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arun,
Skeletons haven't been necessary since Java 1.2.
Regards, Andrew
 
Yuan Ye
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you guys, I've got it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic