CORBA 2.6.1 Programmer's Guide for C++

Setting Up ns_browse to View the Naming Service
The ns_browse tool runs on the NonStop system, and it allows you to look at entries stored in the Naming Service database. You might use the
ns_browse tool if for some reason you did not want to use the Console, or if the Console were not available. The ns_browse tool for NonStop
CORBA is located in the
$NSD_ROOT/bin/unsupported directory.
The ns_browse Tool Syntax
ns_browse [-ior stringified-NamingContext] operation
where
-ior stringified-NamingContext
This option specifies the stringified object reference of a naming context to use 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, 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:
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