Discussion:
[omniORB] Problem with corba object passing from client to server
guru.jalsar guru
2009-10-21 09:44:39 UTC
Permalink
Hi,
I am stuck with this issue,i want pointer to point to same location ,but
this what happening with me.............

I got corba object as return value from server methods and i am passing the
same object to server methods once againg,the pointer location is changed.

But still i am able to access the correct data ?

I am eager to know why this is happening ?


for example:

clent:
server

CORBA::Object_var objvar = server->func(); CORBA::Object_ptr
func()
{

return corba object
}


server->func1(objvar);
server->func1(objvar);

when i pass the same "objvar" to multiple functions also it is changing the
pointer value,but still i am getting correct data ,why ?

Guru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20091021/ef120e83/attachment.htm
Duncan Grisby
2009-10-23 17:02:18 UTC
Permalink
Post by guru.jalsar guru
I got corba object as return value from server methods and i am
passing the same object to server methods once againg,the pointer
location is changed.
When you pass an object reference as a parameter or return value, there
is no guarantee that the proxy object received on the other side is the
same every time. All the proxy objects refer to the same underlying
CORBA object, but you can't make any assumptions about the particular
pointer values.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...