Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changes to objects passed to remote method calls vs local method calls

 
Arun Natarajan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When an object is passed as a parameter to a remote method in a session bean, and the method makes changes to the parameter is that change reflected in the client side? I think the change will not be reflected, since the remote method gets a copy of the object as parameter instead of a copy of the reference to the object on client side.
And what happens if the method was in a local session bean instead of a remote bean.

Thanks.
 
paresh vernekar
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
You are right about the remote invocation.In case of a local invocation objects are passed by reference.Hence any change to the object will be reflected at the local client side.Hence when coding beans with local interfaces special care must be taken for this

Regards,
Paresh Vernekar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic