Example: Invoking the name space dump utility

It is often helpful to view a dump of the name space to understand why a naming operation is failing. You can invoke the name space dump utility from the command line or from a program. Examples of each option follow.

Invoking name space dump utility from a command line

Invoke the name space dump utility from the command line by entering the following command:

dumpNameSpace -host myhost.mycompany.com -port 901
OR
dumpNameSpace -url corbaloc:iiop:myhost.mycompany.com:901

There are several command line options to choose from. For detailed help, enter the following command:

dumpNameSpace -help

For the z/OS environment: Use the dumpNameSpace.sh command. (Add .sh to the utility name.)

Invoking name space dump utility from a Java program

You can dump name spaces from a program with the com.ibm.websphere.naming.DumpNameSpace API. Refer to the WebSphere Application Server API documentation for details on the DumpNameSpace program interface

The following example illustrates how to invoke the name space dump utility from a Java program:

{
   ...
   import javax.naming.Context;
   import javax.naming.InitialContext;
   import com.ibm.websphere.naming.DumpNameSpace;
   ...
   java.io.PrintStream filePrintStream = ...
   Context ctx = new InitialContext();
   // Starting context for dump
   ctx = (Context) ctx.lookup("cell/nodes/node1/servers/server1");
   DumpNameSpace dumpUtil =
      new DumpNameSpace(filePrintStream, DumpNameSpace.SHORT);
   dumpUtil.generateDump(ctx);
   ...
}

Related tasks
Troubleshooting name space problems
Related reference
dumpNameSpace tool



Searchable topic ID:   rnam_example_dump
Last updated: Jun 21, 2007 9:56:50 PM CDT    WebSphere Application Server for z/OS, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/rnam_example_dump.html

Library | Support | Terms of Use | Feedback