File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Arguments / Return values for a Remote Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Arguments / Return values for a Remote Method" Watch "Arguments / Return values for a Remote Method" New topic
Author

Arguments / Return values for a Remote Method

KRK Gowda
Ranch Hand

Joined: Nov 02, 2004
Posts: 132
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
Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290
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!


SCJP | SCWCD | SCBCD | SCWSD 5 | SCEA (I) 1.4 | SCEA 5 | IBM SOA 669
KRK Gowda
Ranch Hand

Joined: Nov 02, 2004
Posts: 132
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Arguments / Return values for a Remote Method