Performing operations on running objects using the wsadmin tool
Procedure
- Start wsadmin
- Obtain the object name of the running object. For example:
$AdminControl completeObjectName name AdminControl.completeObjectName(name)where:
$ 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 WAS process completeObjectName is an AdminControl command name is a fragment of the object name. It is used to find the matching object name. For example: type=Server,name=serv1,*. It can be any valid combination of domain and key properties. For example, type, name, cell, node, process, etc. - Set the s1 variable to the running object, for example:
set s1 [$AdminControl completeObjectName type=Server,name=server1,*] s1 = AdminControl.completeObjectName('type=Server,name=server1,*')where:
set is a Jacl command s1 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 WAS process completeObjectName is an AdminControl command type is the object name property key Server is the name of the object name is the object name property key server1 is the name of the server where the operation is invoked - Invoke the operation. For example:
where:
$ 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 WAS process invoke is an AdminControl command s1 is the ID of the server that is specified in step number 3 stop is an operation to invoke on the server
Example
set traceServ [$AdminControl completeObjectName type=TraceService,process=server1,*] $AdminControl invoke $traceServ appendTraceString "com.ibm.ws.management.*=all=enabled" traceServ = AdminControl.completeObjectName('type=TraceService,process=server1,*') AdminControl.invoke(traceServ, 'appendTraceString', "com.ibm.ws.management.*=all=enabled")
See Also
AdminControl object for scripted administration
Related Tasks
Modifying attributes on running objects with the wsadmin tool
See Also
Commands for the AdminControl object