CORBA 2.3.7 Programmer's Guide for Java
This option lists the contexts and objects bound into the naming context specified by context-name. This is
not a recursive operation; it only displays the immediate contents of the context, not recurrences thorough any
contexts subordinate to the base. If no context-name is given, this command lists contents of the base
naming context.
new_context context-name
This option creates a new naming context in the base naming context, and returns the stringified IOR for the new
naming context.
rebind object-name stringified-IOR
This option binds the name specified by object-name to the object whose IOR is specified by
stringified-IOR, even if the name is already bound.
rebind_context context-name stringified-IOR
This option binds the name specified by context-name to the naming context whose IOR is specified by
stringified-IOR, even if the name is already bound.
remove_context context-name
This option unbinds and destroys the naming context specified by context-name, as long as the naming
context is empty.
resolve object-name
This option returns the stringified IOR of the object which is bound to the name specified by object-name.
unbind object-name
This option unbinds the name specified by object-name from the object it is currently bound to.
Examples of ns_browse Commands
The following commands demonstrate how the ns_browse tool works:
Run ns_browse without any parameters, as follows:
ns_browse
This command causes the tool to display usage information.
1.
Run ns_browse to list the contents of the root naming context:
ns_browse list
2.
Run ns_browse to bind a new naming context with name TestCtx test (TestCtx is the name id and
test is the name kind) in the root naming context. This command returns a stringified IOR of the newly created
context.
ns_browse bind_new_context TestCtx test
3.
Run ns_browse to bind a new naming context with name TestCtx1 "" (no kind specified) in the naming
context with name TestCtx test. This action can be done in two ways: One way is to bind a new naming
context, Test Ctx junk TestCtx1 "", to the root naming context. Note that the assumption here is that
the TestCtx test context is bound into the root naming context. For example:
ns_browse bind_new_context TestCtx test TestCtx1 ""
Another way is to bind a new context TextCtx1 "" into the TestCtx test context by using the -ior
option to specify the TestCtx test naming context as the base naming context for this operation. To do this
4.