Sometimes it is helpful to dump the java: name space for a J2EE application. You cannot use the dumpNameSpace command line utility for this purpose because the application's java: name space is accessible only by that J2EE application. From the WebSphere Application Server scripting tool, you can invoke a NameServer MBean to dump the java: name space for any J2EE application running in that same server process.
There is another name space local to server process which you cannot dump with the dumpNameSpace command line utility. This name space has the URL scheme of local: and is used by the container to bind objects locally instead of through the name server. The local: name space contains references to enterprise beans with local interfaces. There is only one local: name space in a server process. You can dump the local: name space by invoking the NameServer MBean associated with that server process.
Name space dump options
Name space dump options are specified in the MBean invocation as a parameter in chararacter string format. The option descriptions follow.
Option | Description |
short | The default. Dumps the binding name and bound object type. This output is also provided by JNDI Context.list(). |
long | Dumps the binding name, bound object type, local object type, and string representation of the local object (that is, the IORs, string values, and other values that are printed). |
Option | Description |
tree | Dump the tree starting at the tree root context. |
host | Dump the tree starting at the server host root context (synonymous with "node"). |
legacy | Dump the tree starting at the legacy root context. |
cell | Dump the tree starting at the cell root context. This is the default option. |
node | Dump the tree starting at the node root context (synonymous with "host"). |
server | Dump the tree starting at the server root context. This is -root default. |
default | Dump the tree starting at the initial context which JNDI returns by default for that server type. |
Specify the format to display name component as atomic strings or parsed according to INS rules (id.kind). This option is only valid for server name space dumps.
Option | Description |
jndi | Display name components as atomic strings. This is -format default. |
ins | Display name components parsed according to INS rules (id.kind). |
NameServer MBean invocation
Invoke a method on a NameServer MBean by using the WebSphere Application Server scripting tool. Enter the scripting command prompt by typing the following command:
Platform | Command |
UNIX | wsadmin.sh |
Windows NT | wsadmin |
Use the -help option for help on using the wsadmin command.
Execute the following script commands to select the NameServer instance you want to invoke. For example,
set mbean [$AdminControl completeObjectName WebSphere:*,type=NameServer,cell= cellName,node=nodeName,process=serverName]where cellName, nodeName, and serverName are the names of the cell, node, and server for the MBean you want to invoke. The specified server must be running before you can invoke a method on the MBean.
You can see a list of all NameServer MBeans current running by issuing the following query:
$AdminControl queryNames {*:*,type=NameServer}
$AdminControl invoke $mbean dumpJavaNameSpace {{appname}{modName}{compName}{opts}}
where appName is the application name, modName is the module name, and compName is the component name of the java: name space you want to dump. The value for opts is the list of name space dump options described earlier in this section. The list can be empty.
$AdminControl invoke $mbean dumpLocalNameSpace {{opts}}
where opts is the list of name space dump options described earlier in this section. The list can be empty.
$AdminControl invoke $mbean dumpServerNameSpace {{opts}}
where opts is the list of name space dump options described earlier in this section. The list can be empty.
Name space dump output
Name space dump output is sent to the console. It is also written to the file DumpNameSpace.log, in the server's log directory.