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
Resolving a Named Object
This procedure demonstrates how you can resolve an object in the system name space. This is useful for finding an object with a human-readable name. Only an object from an existing naming context can be resolved. If you use a compound name, all of the naming contexts identified in the name-path must already exist before the object can be resolved. The name you are resolving should already have been bound.
1.Resolve to the target naming context: The target naming context is the target naming context in which you want resolve the object, that is where you expect the object to have been bound. You can resolve to the target name context with the resolve() operation using the following choices:
If you already have a reference to the target naming context you can skip to step 2 without doing anything further.
If you already have a reference to a naming context that is superior to the target naming context, 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 do not 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.
2.Resolve the object: Once you are positioned at the target
naming context, you can resolve the object by its name using the resolve() or resolve_with_string() operation on the target naming context.
You can combine steps 1 and 2 by supplying a compound name that includes the path to the target name context and the name of the object being resolved in the name argument on the resolve() or resolve_with_string() operations. In this case, step 1 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