[omniORB] parsing stringified IOR

Stephen Crawley crawley@dstc.edu.au
Fri, 19 Nov 1999 10:05:50 +1000


Robert Merkel writes: 
> Rob Cecil writes:
>  > Is there a function somewhere that will let me programmatically do
>  > what catior does?  I'd
>  > like to be able to determine the IP or hostname from a stringified
>  > IOR.  I have been
>  > looking at ior.cc but nothing seems obvious to me.  Is there a utility api?
>  > 
> 
> Are you sure that you should be doing this?  As I understand it, the
> point of object references is that they are opaque, and that the 
> only people who should be worrying about the contents of an object
> reference are ORB implementors.

You are right to point out that Rob probably doesn't want to do that.

Strictly speaking the location information (hostname /IP address and port no)
in an IOR are not opaque.  [The object key is what you were probably thinking
of ... ].  However the location information does not necessarily tell you were
the object resides.  It could also be the location of an object locator. If it
is, the CORBA ORB APIs don't provide any way for a client know this, or to get
hold of  the true object location.

Thus, in general, a CORBA client program cannot reliably deduce anything useful
about an object's location from its IOR.  This is not a design flaw.  Location
transparency is a basic goal for CORBA.

-- Steve