7.3.  Analyze the content of the JNDI namespace using dumpNameSpace.



Run the dumpNameSpace.sh command against any bootstrap port to get a listing of the names bound with that provider URL.

The output of the command:

The tool indicates that certain names point to contexts external to the current server and its name space. The links show the transitions necessary to perform a lookup from one name space to another.

NOTE: An invocation of the dumpNameSpace.sh command cannot generate a dump of the entire name space, only the objects bound to the bootstrap server and links to other local name spaces that compose the federated name space. Use the correct host name and port number for the server to be dumped.

To run the dumpNameSpace.sh command, type the following:

server_root/bin/dumpNameSpace.sh [options]

All arguments are optional. Table below shows the available options.

Table 7.2.  dumpNameSpace.sh Options


-host <hostname>

This option is the host name of bootstrap server. If it is not defined, then the default is localhost.

-port <portnumber>

This option is the bootstrap server port number. If i is not defined, then the default is 2809.

-factory <factory>

This option is the initial context factory to be used to get initial context. The default of com.ibm.websphere.naming.WsnInitialContextFactory is okay for most use.

-root [ cell | server | node | host | legacy | tree | default ]

WebSphere V5.0 or later:

  • cell: dumpNameSpace default. Dump the tree starting at the cell root context.

  • server: Dump the tree starting at the server root context.

  • node: Dump the tree starting at the node root context. (Synonymous with "host")

  • default: Dump the tree starting at the initial context that JNDI returns by default for that server type. This is the only -root choice that is compatible with WebSphere servers prior to V4.0 and with non-WebSphere name servers.

-url <url>

This option is the value for the java.naming.provider.url property used to get the initial JNDI context. This option can be used in place of the -host, -port, and -root options. If the -url option is specified, the -host, -port, and -root options are ignored.

-startAt <context>

This option is the path from the requested root context to the top level context where the dump should begin. Recursively dumps subcontexts below this point. Defaults to empty string, that is, root context requested with the -root option.

-format <format>

  • jndi: Display name components as atomic strings.

  • ins: Display name components parsed against INS rules (id.kind).

The default format is jndi.

-report <length>

  • short: Dumps the binding name and bound object type, essentially what JNDI Context.list() provides.

  • long: Dumps the binding name, bound object type, local object type, and string representation of the local object. In other words, IORs, string values, and so on, are printed.

The default report option is short.

-traceString <tracespec>

Trace string of the same format used with servers, with output going to the file DumpNameSpaceTrace.out.

-help or -?

Prints a usage statement.

dumpNameSpace.sh usage.

Get help on options:

$ dumpNameSpace.sh -?					

Dump server on localhost:2809 from cell root:

$ dumpNameSpace.sh					

Dump server on localhost:2806 from cell root:

$ dumpNameSpace.sh -port 2806					

Dump server on yourhost:2811 from cell root:

$ dumpNameSpace.sh -port 2811 -host yourhost					

Dump server on localhost:9810 from server root:

$ dumpNameSpace.sh -root server

Dump server at corbaloc:

$ dumpNameSpace.sh -url corbaloc:iiop:yourhost:901					

Professional hosting         Free 'Oracle Certified Expert Web Services Developer 6' Guide     Free SCDJWS 5.0 Guide