C   O   R   B   A
  O R B  
 
Home
CORBA
ORBs
Project
The Hawaii Group
Services
Naming
Event
Vendors
Comparison
In Industry
Telecom
Resources
Text
Links
 
 
Common Object Request Broker Architecture
 
Naming Service

Summary by Uma Jaipradeep  
Implementation by Prasad Joshi
 
 

The information presented was gathered from Internet. 

Summary Contents

Naming Service Overview
Naming Objects in the Distributed Object System
Naming Contexts
Object Names
Binding an Object with a Name
Resolving a Named Object
Creating a New naming Context
Listing the Contents of a Naming Context
Unbinding an Object from a Naming Context
Client-Server Naming Scenario
Implementation of Naming Service
Links


Creating a New naming Context

This procedure demonstrates how you can create new naming contexts bound in the system name space. This is useful for creating a context for binding related objects, for instance, a prospecting analysis folder or a list of brokerage services. 

You can only create a new naming context from an existing naming context. This means you can only create new naming contexts within the system name space. You can get a reference to any naming context in the system name space by first getting the local root context using ORB::resolve_initial_references ("NameService") and subsequently resolving to the naming context where you want to create (and bind) a new naming context.

   1.Decide where you want to create the new naming context: Your new naming context is bound in the system name space, but you need to decide where. This may result in needing to create other naming contexts to build an appropriate name tree for the new naming context. Also, be sure to consider the scope of visibility that you want the new context to have. This determines whether the naming context should be placed within the Host, Workgroup, or Cell name-trees.

   2.Resolve to the target naming context: The target naming context is the naming context in which you want the new naming context to be bound. You can resolve to the target name context with the resolve() operation using one of the following choices:

          If you already have a reference to the target naming context, you can skip to step 3 without doing anything further.

          If you already have a reference to a naming context that is superior to the target naming context then you can invoke the resolve() operation on the superior naming context, passing in the name of the target naming context. This principle can be applied recursively for any of the successively more superior naming contexts.

          If you don't already have a naming context, you can get the root to the system name space using the ORB::resolve_initial_references("NamingService") operation (the CORBA standard approach) or by obtaining it from the CBSeriesGlobal::nameService static function (this static function is set by the CBSeriesGlobal::Initialize()& method).

          Having acquired the root naming context, you can resolve directly to the intended naming context by invoking the resolve() operation and passing the complete path of intermediate naming context names as a compound name.

   3.Create and bind the new naming context: Once you are positioned at the target naming context, you can create a new naming context and bind it with a new name at the same time using the bind_new_context() or bind_new_context_with_string() operation on the target naming context.

You can combine steps 2 and 3 by supplying a compound name that includes the path to the target name context and the name of the new naming context in the name argument on the bind_new_context() or bind_new_context_with_string() operation. In this case step 2 is performed implicitly.


Summary Contents

Naming Service Overview
Naming Objects in the Distributed Object System
Naming Contexts
Object Names
Binding an Object with a Name
Resolving a Named Object
Creating a New naming Context
Listing the Contents of a Naming Context
Unbinding an Object from a Naming Context
Client-Server Naming Scenario
Implementation of Naming Service
Links


| Top of Page |