104 lines
5.7 KiB
HTML
104 lines
5.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
|
|
|
|
<title>Invoke the NameServer MBean to dump java:, local:, and server name spaces</title>
|
|
</head>
|
|
|
|
<BODY>
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
<h6><a name="jndidumploc"></a>Invoke the NameServer MBean to dump java:, local:, and server name spaces</h6>
|
|
|
|
<p>It may be 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.</p>
|
|
|
|
<p>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.</p>
|
|
|
|
<p>To invoke the NameServer MBean:</p>
|
|
<ol>
|
|
<li><a href="../admin/wsarun.htm#start">Start the wsadmin tool</a>.</li>
|
|
|
|
<li>Select the NameServer MBean instance to invoke.
|
|
<p>Execute the following script commands to select the NameServer instance you want to invoke. For
|
|
example:
|
|
<pre>set mbean [$AdminControl completeObjectName WebSphere:*,type=NameServer,cell=
|
|
<em>cellName</em>,node=<em>nodeName</em>,process=<em>serverName</em>]</pre>
|
|
<p>where <em>cellName</em>, <em>nodeName</em>, and <em>serverName</em> 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.</p>
|
|
<p>You can see a list of all NameServer MBeans current running by issuing the following query:
|
|
<pre>$AdminControl queryNames {*:*,type=NameServer}</pre>
|
|
</p></li>
|
|
<li>Invoke the NameServer MBean.
|
|
<dl>
|
|
<dt><strong>java: name space</strong></dt>
|
|
<dd>Dump a java: name space by invoking the dumpJavaNameSpace method on the
|
|
NameServer MBean. Since each server application has its own java: name space,
|
|
the application must be specified on the method invocation. An application
|
|
is identified by the application name, module name, and component name. The
|
|
method syntax follows:
|
|
<pre>$AdminControl invoke $mbean <strong>dumpJavaNameSpace</strong>
|
|
{{<em>appname</em>}{<em>modName</em>}{<em>compName</em>}{<em>opts</em>}}</pre>
|
|
<p>where <em>appName</em> is the application name, <em>modName</em> is the module
|
|
name, and <em>compName</em> is the component name of the java: name space you
|
|
want to dump. The value for <em>opts</em> is the list of name space dump options
|
|
described earlier in this section. The list can be empty.</p>
|
|
</dd>
|
|
<dt><strong>local: name space</strong></dt>
|
|
<dd>Dump a java: name space by invoking the dumpLocalNameSpace method on the
|
|
NameServer MBean. Since there is only one local: name space in a server process,
|
|
you have to specify the name space dump options only.
|
|
<pre>$AdminControl invoke $mbean dumpLocalNameSpace {{<em>opts</em>}}</pre>
|
|
<p>where <em>opts</em> is the list of name space dump options described earlier in this section.
|
|
The list can be empty.</p>
|
|
</dd>
|
|
<dt><strong>Server name space</strong></dt>
|
|
<dd>Dump a server name space by invoking the dumpServerNameSpace method on
|
|
an application server's NameServer MBean. This provides an alternative way
|
|
to dump the name space on an application server, much like the dumpNameSpace
|
|
command line utility.
|
|
<pre>$AdminControl invoke $mbean dumpServerNameSpace {{<em>opts</em>}}</pre>
|
|
<p>where <em>opts</em> is the list of name space dump options described earlier in this section. The list can be empty.</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
</ol>
|
|
|
|
<p><strong>Examples: Invoking the name space dump utility for java: and local: name
|
|
spaces</strong></p>
|
|
|
|
<p>It is often helpful to view the dump of a <samp>java:</samp> or <samp>local:</samp> name
|
|
space to understand why a naming operation is failing. The NameServer MBean
|
|
running in the application's server process can be invoked from the WebSphere
|
|
Application Server scripting tool to generate a dump of these name spaces.
|
|
Examples of NameServer MBean calls to generate dumps of java: and local: name
|
|
spaces follow.</p>
|
|
<blockquote>
|
|
<p><strong>Dumping a java: name space</strong></p>
|
|
|
|
<p>Assume you want to dump the java: name space of an application component running in server
|
|
server1 on node node1 of the cell MyCell. The application name is AcctApp
|
|
in module AcctApp.war, and the component name is Acct Servlet. The following
|
|
script commands generate a long format dump of the application's java: name
|
|
space of that application:</p>
|
|
<pre>set mbean [$AdminControl completeObjectName
|
|
WebSphere:*,type=NameServer,cell=MyCell,node=node1,process=server1]
|
|
$AdminControl invoke $mbean dumpJavaNameSpace {{AcctApp}{AcctApp.war}{Acct Servlet}{-report
|
|
long}}</pre>
|
|
|
|
<p><strong>Dumping a local: name space</strong></p>
|
|
|
|
<p>Assume you want to dump the local: name space for the server server1 on node node1 of
|
|
cell MyCell. The following script commands will generate a short format dump
|
|
of that server's local name space:</p>
|
|
<pre>set mbean [$AdminControl completeObjectName
|
|
WebSphere:*type=NameServer,cell=MyCell,node=node1,process=server1]
|
|
$AdminControl invoke $mbean dumpLocalNameSpace {{-report short}}</pre>
|
|
</blockquote>
|
|
|
|
|
|
</body>
|
|
</html>
|