[46] NAME SERVICE UPDATED!
(Part of the CORBA FAQ, Copyright © 1996-99)


[46.1] WHAT ARE THE IDL INTERFACES DEFINED WITHIN THE COSNAMING MODULE?

The CORBA Name Service is composed of two basic interfaces. The NameContext and the Binding Iterator. Remember that since the NameContext and the Binding Iterator are both CORBA interfaces, they are accessed via object references and are distributed. The NameContext contains “named” object references or other “named” NameContexts. It is similar to a directory that can contain named files or other named directories. NameContexts and Binding Iterators are usually implemented in the same Name Server process, but this is not a requirement. The CORBA NameService can be constructed as a set of interconnected NameContext objects and NameService processes.

The BindingIterator is used to iterate across object references contained within a particular NameContext. It basically provides a mechanism to get the number of named object references within a NameContext. It also provides a next_one and a next_n operation to retrieve individual named object references or contexts. Continuing with the directory analogy, The BindingIterator is a mechanism to do a ls or dir operation on a directory.

TopBottomPrevious sectionNext section ]


[46.2] HOW DO I USE A NAMECONTEXT?

The NameContext interfaces supports two main operations, bind and resolve. Once a NameContext object reference is obtained, it can be used to “name” some other CORBA object, or retrieve an object reference by name. This means that you can call the bind method on a NameContext passing it an object reference and a name. This will place a named object reference into the NameContext for future resolve calls. If an application wishes to obtain an object reference by name is simply obtains the appropriate NameContext and call resolve with the particular name. This will cause the named object reference to be returned to the application making the resolve invocation.

TopBottomPrevious sectionNext section ]


[46.3] WHAT IF I DO NOT KNOW THE NAME OF THE OBJECT?

The CORBA NameService was designed to allow object references to be obtained by name. Names need to be either agreed upon between servers or clients, or perhaps passed between components in the distributed application. It is also possible to use the BindingIterator interface to connect to any name object reference. The CORBA trading service might be more appropriate if the CORBA NameService is too limiting. Other architectures such as factories might be appropriate mechanisms to obtain object references.

TopBottomPrevious sectionNext section ]


[46.4] WHAT IS THE INTEROPERABLE NAME SERVICE (INS)? NEW!

[Recently created (10/1999). Click here to go to the next FAQ in the “chain” of recent changes]

The Interoperable Name Service (INS) fixes a technical glitch in the original CORBA Name Service. The original Name Service did not truly allow object references from different ORB vendors to be stored and accessed from within a single Name Server. This is fixed by the INS. There are no API or IDL changes, so application developers should not notice a difference.

TopBottomPrevious sectionNext section ]


E-Mail E-mail us
CORBA FAQTable of ContentsExhaustiveAlphabeticalSubject indexAbout the authors©TMDownload your own copy ]
Revised Oct 27, 1999