Steps for this task
Using Jacl:
set var [$AdminControl completeObjectName template]where:
set | is a Jacl command |
var | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminControl | is an object that enables the manipulation of MBeans running in a WebSphere server process |
completeObjectName | is an AdminControl command |
template | is a string containing a segment of the object name to be matched. The template has the same format as an object name with the following pattern: [domainName]:property=value[,property=value]*. See Object name, Attribute, Attribute list for more information. |
If there are several MBeans that match the template, the completeObjectName command only retuns the first match. The matching MBean object name is then assigned to a variable.
To look for server1 MBean in mynode, use the following example:
Using Jacl:
set server1 [$AdminControl completeObjectName node=mynode,type=Server,name=server1,*]
Using Jacl:
set var [$AdminControl queryNames template]where:
set | is a Jacl command |
var | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminControl | is an object that enables the manipulation of MBeans running in a WebSphere Application server process. |
queryNames | is an AdminControl command |
template | is a string containing a segment of the object name to be matched. The template has the same format as an object name with the following pattern: [domainName]:property=value[,property=value]* |
Using Jacl:
set allServers [$AdminControl queryNames type=Server,*] set aServer [lindex $allServers 0]
Results
You can now use the running object in with other AdminControl commands that require an object name as a parameter.