CORBA 2.6.1 Programmer's Guide for Java

where
-ior stringified-NamingContext
This option specifies the stringified object reference of a naming context to be used as the base naming context for the requested
operation. If this option is not specified,
ns_browse uses the root naming context as the base naming context.
operation
This option specifies one of the following operation commands:
bind
bind_context
bind_new_context
destroy
list
new_context
rebind
rebind_context
remove_context
resolve
unbind
Note that the specified operation is performed against the base naming context, as specified with the -ior option. Each operation is
described in detail below.
bind object-name stringified-IOR
This option binds the name specified by object-name to the object whose IOR is specified by stringified-IOR.
bind_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.
bind_new_context context-name
This option binds the name specified by context-name to a new naming context, and returns the stringified IOR of the new naming
context.
destroy
This option destroys the base naming context.
list [context-name]
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 and not the recurrences through any contexts subordinate to the base. When
context-name is not 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, although 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, although 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:
1. Run
ns_browse without any parameters, as follows:
ns_browse
This command causes the tool to display usage information.
2. Run ns_browse to list the contents of the root naming context:
ns_browse list
3. 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
4. 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 ""