Bionic Buffalo Tech Note #100: Identifying CORBA Objects
give a general idea what to expect in a
corbaloc
reference string.
Naming Service References
The Naming Service can be used in two ways to identify objects. One way uses
context objects and name structures, the other way represents the same information in
string form.
The Naming Service creates a tree-structured directory, similar to that of a traditional
file system's directory. An object which approximates a directory or folder is a
naming context. Each naming context can contain <name component, object> pairs,
known as bindings. A name component consists of two strings: id and kind. The id is
a simple name for the binding, while the type is meant to categorize the bound object.
(The specification doesn't mandate how kind will be used. Some implementations use
a simple, short string, analagous to the extension part of a file name, such as
“html”
in the name
“index.html”
. Others use a MIME type, and still others use the
repository id of the object's interface definition.)
At each naming context, a path away from the root can be defined by a sequence of
name components. This sequence is called a name, and it has a well-defined mapping
to each programming language based in the mapping of IDL
sequence
and
struct
types. A <naming context, name> pair identifies a specific object. (Note,
however, that a given object may have multiple names in any given context.)
The Naming Service also defines a procedure for combining these name components
into a single string. This results in strings similar to the path names found in
traditional file systems, strings such as
“abc/def/ghi.jkl”
. Such combined
name components are known as stringified names.
Stringified names appear as the final component of a
corbaname
URL. The
complete syntax is
corbaname:
<corbaloc_object>[#<stringified_name>]
. The reference is similar to
that of a
corbaloc
reference, except that the prefix is different (
“corbaname:”
instead of
“corbaloc:”
), and a stringified name optionally follows the base object
reference. If there is a suffixed stringified name, then the base object must resolve to a
naming context, and the stringified name is used to follow the path from there.
Otherwise, it is interpreted the in the same way as a
corbaloc
URL.
Unlike basic object references and IORs, names and naming contexts aren't always
available. They require that the CORBA or system implementor or application
developer define a directory structure for any objects to be referenced in this fashion.
If you have useful access to an object, you probably have the object's basic reference,
from which you can create an IOR. On the other hand, objects don't always have
names. However, names are useful when objects don't yet exist, because names can be
presumed before the objects are instantiated. For example, a designer might by
convention give a certain name to a commonly-needed service, allowing an
Page 5 of 7