Interoperable Naming Service (INS)

The CORBA CosNaming Service follows the Object Management Group (OMG) Interoperable Naming Service specification (INS, CORBA 2.3 specification). CosNaming stands for Common Object Services Naming.

The name service maps names to CORBA object references. Object references are stored in the namespace by name and each object reference-name pair is called a name binding. Name bindings can be organized under naming contexts. Naming contexts are themselves name bindings, and serve the same organizational function as a file system subdirectory does. All bindings are stored under the initial naming context. The initial naming context is the only persistent binding in the namespace.

This implementation includes string formats that can be passed as a parameter to the ORB methods string_to_object() and resolve_initial_references(). The formats are corbaname and corbaloc.

Corbaloc URIs allow you to specify object references that can be contacted by IIOP or found through ORB::resolve_initial_references(). This format is easier to manipulate than IOR. To specify an IIOP object reference, use a URI of the form:
corbaloc:iiop:<host>:<port>/<object key>
Note: See the CORBA 2.4.2 specification for the full syntax of this format.
For example, the following corbaloc URI specifies an object with key MyObjectKey that is in a process that is running on, listening on port 2809:
Corbaname URIs cause the string_to_object() method to look up a name in a CORBA naming service. The URIs are an extension of the corbaloc syntax:
corbaname:<corbaloc location>/<object key>#<stringified name>
Note: See the CORBA 2.4.2 specification for the full syntax of this format.
An example corbaname URI is:

In this example, the portion of the reference up to the number sign character (#) is the URL that returns the root naming context. The second part of the example, after the number sign character (#), is the argument that is used to resolve the object on the NamingContext.

The INS specified two standard command-line arguments that provide a portable way of configuring ORB::resolve_initial_references():
  • -ORBInitRef takes an argument of the form <ObjectId>=<ObjectURI>. For example, you can use the following command-line arguments:

    In this example, resolve_initial_references("NameService") returns a reference to the object with key NameService available on, port 2809.

  • -ORBDefaultInitRef provides a prefix string that is used to resolve otherwise unknown names. When resolve_initial_references() cannot resolve a name that has been configured with -ORBInitRef, it constructs a string that consists of the default prefix, a forward slash character (/), and the name requested. The string is then supplied to string_to_object(). For example, with a command line of:
    a call to resolve_initial_references("MyService") returns the object reference that is denoted by