In the WebSphere Application Server, MBeans represent running objects.
You can interrogate the MBean server to see the objects it contains. Use the
AdminControl object to interact with running MBeans.
$AdminControl queryNames *Using Jython:
print AdminControl.queryNames('*')This command returns a list of all MBean types. Depending on the server to which your scripting client attaches, this list can contain MBeans that run on different servers:
WebSphere:cell=MyCell,name=TraceService,mbeanIdentifier=TraceService,type=TraceService,node=MyNode,process=server1This example represents a TraceServer object that runs in server1 on MyNode.
$AdminControl queryNames WebSphere:*Using Jython:
AdminControl.queryNames('WebSphere:*')
These key properties are common. There are other key properties that exist. You can use any of these key properties to narrow the scope of the queryNames command. For example:Using Jacl:
$AdminControl queryNames WebSphere:type=Server,node=myNode,*Using Jython:
AdminControl.queryNames('WebSphere:type=Server,node=myNode,*')This example returns a list of all MBeans that represent server objects running the node myNode. The, * at the end of the ObjectName object is a JMX wildcard designation. For example, if you enter the following:Using Jacl:
$AdminControl queryNames WebSphere:type=Server,node=myNodeUsing Jython:
print AdminControl.queryNames('WebSphere:type=Server,node=myNode')you get an empty list back because the argument to queryNames is not a wildcard. There is no Server MBean running that has exactly these key properties and no others.
$AdminControl queryNames WebSphere:type=Application,node=myNode,*Using Jython:
print AdminControl.queryNames('WebSphere:type=Application,node=myNode,*')