• Post Reply Bookmark Topic Watch Topic
  • New Topic

Arguments / Return values for a Remote Method  RSS feed

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
i was reading HFEJB and found that "

for remote calls, java passes objects by object copy, not reference copy

". This was in page no 68
in page no 74, i found "

When you pass a remote object to or from remote method, java actually sends the remote objects stub

".
after reading till page no 74, i got confused over whether remote methods in EJB will receive object copy of arguments or stub of the arguments.

Please make it clear

Thanks and Regards,
Gowda
 
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI...

Well..i guess the either optinos are correct..Let's try to mix them :

--> "for remote calls, java passes **remote objects stub** by ** remote objects stub** copy, not reference copy!!!

Does it make sense?

I would like always something like : "COPY OF reference"....and (for remote calls) ALWAYS "stubs"!!!

Please guys advise on this too!!!

Tks!
 
KRK Gowda
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
After reading couple of pages after page number 74, i found list of types of arguments/return types for a remote method. Following are my understandings. Please correct me if i am off the path.
A remote method can take/return a primitive, a serialised object, An array of seiralised objects, a remote object.
When a remote method takes/returns objects, those objects will be passed by java as "

Objects copy

" not reference copy
When a remote method takes/returns a remote object, then stub for the remote method will be passed to/from the remote method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!