Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Use the wsadmin scripting AdminControl object for scripted administration
Performing operations on running objects using wsadmin.sh
We can use scripting to invoke operations on running objects.
We can run wsadmin commands that obtain the object names of running objects and perform operations:
Procedure
- Obtain the object name of the running object. For example:
### Jacl $AdminControl completeObjectName name### Jython AdminControl.completeObjectName(name)
- Set the s1 variable to the running object, for example:
### Jacl
set s1 [$AdminControl completeObjectName type=Server,name=server1,*]### Jython
s1 = AdminControl.completeObjectName('type=Server,name=server1,*')
- Invoke the operation. For example:
### Jacl
$AdminControl invoke $s1 stop### Jython
AdminControl.invoke(s1, 'stop')
Example
The following example is for operations that require parameters:
### Jacl
set traceServ [$AdminControl completeObjectName type=TraceService,process=server1,*] $AdminControl invoke $traceServ appendTraceString "com.ibm.ws.management.*=all=enabled"### Jython
traceServ = AdminControl.completeObjectName('type=TraceService,process=server1,*') AdminControl.invoke(traceServ, 'appendTraceString', "com.ibm.ws.management.*=all=enabled")
Start the wsadmin scripting client using wsadmin.sh
Use the wsadmin scripting AdminControl object for scripted administration
Modify attributes on running objects using wsadmin.sh
Related
Commands for the AdminControl object using wsadmin.sh