The following ns commands let you manage and browse the naming service:
ns bindCreates an association between a context or object reference and the specified compound name.
ns list ns newncCreates a new naming context or object and binds it to the specified path.
ns remove ns resolveDisplays a resolved string name form of the IOR for a specified path.
ns stop ns unbind
ns bind
ns bind {-context | -object} -path path IORCreates an association between a context or object reference and the path-specified compound name. Use this command in command-line mode only.
-contextBinds a context
-objectBinds an object.
-pathSpecifies an INS string name as the path to the new binding.
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.
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.
itadmin % ns newnc foo.bar/foo3.bar3 % ns list foo.bar /foo2.bar2 Context /foo3.bar3 Contextns remove
ns remove [-recursive] pathUnbinds 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
-recursiveRecursively destroys and unbinds a context or object if the context is not empty.
ns resolve
ns resolve pathPrints 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.
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 stopns unbind
ns unbind pathUnbinds the context or object specified by path. The path argument takes the form of an INS string name.