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

Doubts in Sending the Object as argument in remote call

 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The client is sending the object(ex og object) as a argument to the stub and the stub is sending to the remote as a whole serialized object instead of reference.
My Doubt related to this are:
1. Suppose my Dog Object at client side is having some data. Since the same Dog object will be newly created at remote site, what if I want to do something with the value of the dog object at the remote side?
2. I have send the dog object to the remote and its working on it and at that time I am chaning the dog object at the client side. What will be the impact?
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose my Dog Object at client side is having some data. Since the same Dog object will be newly created at remote site, what if I want to do something with the value of the dog object at the remote side?

As the object is passed by value, so nothing will happen to the original object.
I have send the dog object to the remote and its working on it and at that time I am chaning the dog object at the client side. What will be the impact?

Nothing will happen as both have their own copies of object.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Micheal John:
The client is sending the object(ex og object) as a argument to the stub and the stub is sending to the remote as a whole serialized object instead of reference.
My Doubt related to this are:
1. Suppose my Dog Object at client side is having some data. Since the same Dog object will be newly created at remote site, what if I want to do something with the value of the dog object at the remote side?


Your main purpose is to send couple of data to the server , so you are using the dog object for that and you want that after the processing of the logic in the bean it should return you another object encapsulation the data or a single data back.

Originally posted by Micheal John:

2. I have send the dog object to the remote and its working on it and at that time I am chaning the dog object at the client side. What will be the impact?


How can you process the dog object simultaneously.
After you return from the bean method call , you can change the dog class , but will not have any impact to the dog object that you have sent to the server.
[ May 15, 2007: Message edited by: Rahul Bhattacharjee ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic