[omniORB] use of create_object_with_id in omniORB
Duncan Grisby
duncan@grisby.org
Sun Mar 23 19:56:01 2003
On Saturday 22 March, "bitostef@katamail.com" wrote:
> In his book Henning says:"Calling create_reference_with_id multiple
> times with the same ObjectId and same rep. id is legal, but the
> result may vary among POA implem.".
Read the rest of that paragraph. It goes on to say that it doesn't
matter what the behaviour is.
What H&V are saying is that if you write code like this
CORBA::Object_ptr obj1 = poa->create_reference_with_id(oid, repid);
CORBA::Object_ptr obj2 = poa->create_reference_with_id(oid, repid);
it is undefined whether obj1 == obj2.
However, it is completely irrelevant whether they are the same pointer
or not, since object references are opaque to clients. They are
functionally equivalent to each other, and that's all that matters.
In omniORB you will sometimes get the same pointer, sometimes not, but
as I say, it doesn't matter in the slightest. Why do you care?
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan@grisby.org --
-- http://www.grisby.org --