To understand why a naming operation is failing, you can view the dump of a java: or local: name space. From the wsadmin scripting tool, invoke a NameServer MBean to dump java: or local: name spaces.
If the name spaces that you want to view are not local to the server process, use the dumpNameSpace tool.
The java: name space of a J2EE application is accessible only by that application. You can invoke a NameServer MBean to dump the java: name space for any J2EE application running in the same server process.
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 invoke the NameServer MBean associated with that server process to dump the local: name space.
Use the scripting tool to invoke the NameServer MBean running in the application's server process to generate dumps of java: , local:, or server name spaces.
Dumping a java: name space
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:
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: name space
Assume you want to dump the local: name space for the server server1 on node node1 of cell MyCell. The following script commands generate a short format dump of that server's local name space:
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 name spaces
Assume you want to use Jython to run the NameServer MBean methods that dump java:, local: or server name spaces 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: name space 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: name space:
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 name space:
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) |