wood burning stoves 2.0*
The moose likes Distributed Java and the fly likes pass by value or pass by reference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "pass by value or pass by reference" Watch "pass by value or pass by reference" New topic
Author

pass by value or pass by reference

Terrence Zhong
Greenhorn

Joined: Feb 04, 2011
Posts: 1
I'm very confused about passing remote and non-remote objects. Does anyone know wether the following is passed by value or passed by reference?
1. pass non-remote object in non-remote function (pass by value? since the object is local)
2. pass non-remote object in remote function (pass by value? since the object is local)
3. pass remote object in non-remote function (not sure if this is possible)
4. pass remote object in remote function (pass by reference?)

Thank you!
Ram Narayan.M
Ranch Hand

Joined: Jul 11, 2010
Posts: 247

In RPC, there is no place for "Pass by reference" as the remote entity does not have the exposure of the memory details of other remote entity...

As the objects are serialized and sent to remote end, objects will be de-serialized and reincarnates as object in heap... So Its all pass by value at their ends...


SCJP 6 [SCJP - Old is Gold]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: pass by value or pass by reference
 
Similar Threads
side effects in value object passed to session bean?
how are the objects passed by value or by reference
How the object is passed in EJB?
Local Vs Remote
Passed By Reference?