[omniORB] Comparing object references

Kevin Bailey ke-omniorb@retriever.dyndns.org
Thu, 31 May 2001 17:52:16 -0700


I would like to compare object references but, according to H&V,
I can't. Two references may claim to be unequal, using either
_is_equivalent() or object_to_string(), even when they refer to
the same object.

If this is true, I'm left with passing stringified references
all over the place which an object must hold on to its entire
life and hand out copies of when asked. In other words, an
object uses the exact same stringified reference to refer to
itself its entire life. The exact same stringified reference
should always compare equal.

This approach, however, seems silly; the ORB should be doing all
this for me. In addition it excludes using standard CORBA
practices like getting object references from name servers
and using reference counts.

Assuming it's not as bad as this, I have the following questions
about omniORB:

Given an object reference, will _duplicates() of it compare
equal via _is_equivalent() if the original and all duplicates
are within the same process ?

Given an object reference, will object_to_string() ever return
different values for it at different times in the same process ?

Will copies of an object reference repeatedly pulled out of a
name server into the same process ever return not
_is_equivalent() ?

If the answer is 'yes' to any of these, I guess the important
question is really, 'why ?'

Thanks for any info