• Post Reply Bookmark Topic Watch Topic
  • New Topic

please correct me if i m wrong

 
nishwas mahindra
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q. How parameter passing is done for remote object?
my ans is :
stub of the object is passed by value over the wire.
or reference of stub is passed...
if this one is true ....then how is it possible to pass a refference that is memory address of one m/c to other m/c
i m really confused in this thing
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bipin,
If the parameter, that you wish to pass, implements the "java.rmi.Remote" interface, then yes: the stub is transferred.
However, you may also pass a primitive -- boolean, byte, char, double, float, int, long or short -- in which case there is no stub, or any serializable java object -- a java class that implements the "java.io.Serializable" interface.
This is all detailed in the RMI specification:
http://java.sun.com/products/jdk/rmi/
Good Luck,
Avi.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!