• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Arguments / Return values for a Remote Method

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic