To understand why a naming operation is failing, you can view the dump of a java: or local: namespace. From the WebSphere® Application Server scripting tool, invoke a NameServer MBean to dump java: or local: namespaces.
If the namespaces that you want to view are not local to the server process, use the dumpNameSpace tool.
The java: namespace of a Java™ Platform, Enterprise Edition (Java EE) application is accessible only by that application. You can invoke a NameServer MBean to dump the java: namespace for any Java EE application running in the same server process.
The local: namespace contains references to enterprise beans with local interfaces. There is only one local: namespace in a server process. You can invoke the NameServer MBean associated with that server process to dump the local: namespace.
Use the scripting tool to invoke the NameServer MBean running in the application's server process to generate dumps of java: , local:, or server namespaces.
Dumping a java: namespace
Assume you want to dump the java: namespace 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: namespace of that application:
set mbean [$AdminControl completeObjectName WebSphere:*,type=NameServer,cell=MyCell,node=node1,process=server1] $AdminControl invoke $mbean dumpJavaNameSpace {{DefaultApplication}{Increment.jar}{Increment}{-report long}}
Dumping a local: namespace
Assume you want to dump the local: namespace for the server server1 on node node1 of cell MyCell. The following script commands generate a short format dump of that server's local namespace:
set mbean [$AdminControl completeObjectName WebSphere:*,type=NameServer,cell=MyCell,node=node1,process=server1] $AdminControl invoke $mbean dumpLocalNameSpace {{-report short}}
Using Jython to dump java:, local: or server namespaces
Assume you want to use Jython to run the NameServer MBean methods that dump java:, local: or server namespaces for the server server1 on node node1.
The following script commands set the NameServer instance that you want to invoke to nameServerString and then dump a java: namespace for DefaultApplication:
nameServerString = AdminControl.completeObjectName("WebSphere:type=NameServer,node=node1,process=server1,*") print AdminControl.invoke(nameServerString, "dumpJavaNameSpace", '[DefaultApplication Increment.jar Increment "-report long"]')
The following script commands set the NameServer instance that you want to invoke to nameServerString and then dump a local: namespace:
nameServerString = AdminControl.completeObjectName("WebSphere:type=NameServer,node=node1,process=server1,*") print AdminControl.invoke(nameServerString, "dumpLocalNameSpace", '["-report short"]')
The following script commands set the NameServer instance that you want to invoke to nameServerString and then dump a server namespace:
nameServerString = AdminControl.completeObjectName("WebSphere:type=NameServer,node=node1,process=server1,*") print AdminControl.invoke(nameServerString, "dumpServerNameSpace", '["-root server"]')
In this information ...Related reference
Related information
| IBM Redbooks, demos, education, and more(Index) |