Bionic Buffalo Tech Note #100: Identifying CORBA Objects
identification, and ORB descriptions.
Sometimes it is convenient to represent opaque IORs as strings, so they can be stored
an manipulated by applications. For this purpose, two operations (
CORBA::ORB::
object_to_string
and
CORBA::ORB::string_to_object
) are defined,
to convert between an object reference and the string form of an object's IOR. These
strings are called stringified IORs, and consist of the characters
“ior:”
or
“IOR:”
,
followed by a series of hexadecimal digits encoding the IOR.
The
CORBA::ORB::string_to_object
operation, in addition to supporting
stringified IORs, also supports two other formats,
corbaloc
and
corbaname
.
These are discussed below.
References in
corbaloc
Format
References in
corbaloc
format are strings beginning with
“corbaloc:”
, and
which conform to a specific format allowing resolution to an object. There are two
variants of
corbaloc
reference: one is based on the
CORBA::ORB::
resolve_initial_references
operation, and the other is based on protocol
and key (as used in IORs).
The
resolve_initial_references
operation is used by an application to
obtain initial object references, as described above. When used in a
corbaloc
reference, the format of the URL is
“corbaloc:rir:/key”
, where
key
is the
name of the initial service. For example, the URL might be
“corbaloc:rir:
/TradingService”
or
“corbaloc:rir:/NameService”
. Such references
are, of course, limited to objects implementing the initial services available to an
application.
The other variant of the corbaloc reference is similar to that of a simplified IOR. It
includes one or more protocols and machine addresses or names, and an object key.
The syntax is
corbaloc:<address>/<keystring>
, where
<address>
is
[<protocol>]:[<version>@]<host>[:<port>]
. Multiple
<address>
fields may appear, separated by commas. The default
<protocol>
is
“iiop”
. The
default port is 2809. The default host is
localhost
. Examples are:
“corbaloc::abc.xyz.com/filesys/usr/daffy”
(default
protocol IIOP, host abc.xyz.com, default port 2809, object key
“filesys/usr/daffy”
)
“corbaloc:iiop:192.168.1.99:49180/0xaa4362bc”
(protocol IIOP, host 192.168.1.99, port 49180, object key
“0xaa4362bc”
)
The syntax can be more complex than illustrated above, but these examples should
Page 4 of 7