Names


The following ns commands let you manage and browse the naming service:

ns bind 

Creates an association between a context or object reference and the specified compound name.

ns list 

Lists the contents of the specified path.

ns newnc 

Creates a new naming context or object and binds it to the specified path.

ns remove 

Removes the specified context or object.

ns resolve 

Displays a resolved string name form of the IOR for a specified path.

ns stop 

Stops the naming service.

ns unbind 

Unbinds the path-specified context or object.



ns bind

ns bind {-context | -object} -path path  IOR 

Creates an association between a context or object reference and the path-specified compound name. Use this command in command-line mode only.

Arguments



-context 

Binds a context

-object 

Binds an object.

-path 

Specifies an INS string name as the path to the new binding.

Examples

The following example binds an object to the name james.person,in the company/staff naming context:

itadmin ns bind -o -path company/staff/james.person  
"IOR:0000000037e276f47a4b94874c64648e949..." 

ns list

ns list [path]  

Displays the contents of the specified path. If path resolves to a context, its contents are displayed. If path resolves to an object, the object is displayed. If no path is specified, the contents of the initial naming context are displayed. The path argument takes the form of an INS string name.

The type of the binding is also listed. A binding of type Object names an object. A binding of type Context names a naming context.

Examples

The following command lists the bindings in the context company/engineering in the naming service:

itadmin ns list company/engineering 
paula (Object) 
production (Context) 
john (Object) 
manager (Object) 

ns newnc

ns newnc [path] 

Creates a naming context or object and binds it to the specified path. If path is not specified, ns newnc prints the IOR to standard out. The path argument takes the form of an INS string name.

Examples



itadmin 
% ns newnc foo.bar/foo3.bar3 
% ns list foo.bar 
/foo2.bar2      Context 
/foo3.bar3      Context 

ns remove

ns remove [-recursive] path 

Unbinds the specified context or object. If path is a context, the context is also destroyed. The ns remove command checks whether a context is empty before destroying it. If the context is empty, ns remove destroys it and then unbinds it. If the context is not empty and you omit the -recursive argument, ns remove displays an error message. The required path argument specifies an INS string name.

For example, the following commands destroy the manager bindings:

itadmin ns remove company/engineering/manager.person 
itadmin ns remove company/engineering/support/manager.person 

Arguments



-recursive 

Recursively destroys and unbinds a context or object if the context is not empty.

ns resolve

ns resolve path 

Prints the resolved string form of the IOR for a given path specified by an INS string name. If a path is not specified, the string form of the root naming context is displayed. The path argument takes the form of an INS string name.

For example:

itadmin ns resolve company/engineering 
"IOR:0003032272d9218a35d9614357f87c93800d7...6f3" 

The following examples show that the names company/staff/paula.person and company/engineering/manager.person resolve to the same object:

itadmin ns resolve company/staff/paula.person 
"IOR:00000000569a2e8034b94874d6583f09e24..." 
 
itadmin ns resolve company/engineering/manager.person 
"IOR:00000000569a2e8034b94874d6583f09e24..." 

ns stop

ns stop 

Stops the naming service.

ns unbind

ns unbind path 

Unbinds the context or object specified by path. The path argument takes the form of an INS string name.