Before you begin
Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.Why and when to perform this task
Perform the following steps to configure a process:Steps for this task
Using Jacl:
set s1 [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
s1 = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/') print s1
set | is a Jacl command |
s1 | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object representing the WebSphere Application Server configuration |
getid | is an AdminConfig command |
Cell | is the object type |
mycell | is the name of the object that will be modified |
Node | is the object type |
mynode | is the name of the object that will be modified |
Server | is the object type |
server1 | is the name of the object that will be modified |
a Jython command |
server1(cells/mycell/nodes/mynode/servers/server1|server.xml#Server_1)
Using Jacl:
set processDef [$AdminConfig list JavaProcessDef $s1] set processDef [$AdminConfig showAttribute $s1 processDefinition]
Using Jython:
processDef = AdminConfig.list('JavaProcessDef', s1) print processDef processDef = AdminConfig.showAttribute(s1, 'processDefinition')
Example output:
(cells/mycell/nodes/mynode/servers/server1|server.xml#JavaProcessDef_1)
On distributed systems, the following example changes the working directory.
Using Jacl:
$AdminConfig modify $processDef {{workingDirectory c:/temp/user1}}
Using Jython:
AdminConfig.modify(processDef, [['workingDirectory', 'c:/temp/user1']])
Using Jacl:
set errFile [list stderrFilename \${LOG_ROOT}/server1/new_stderr.log] set attr [list $errFile] $AdminConfig modify $processDef [subst {{ioRedirect {$attr}}}]
Using Jython:
errFile = ['stderrFilename', '\${LOG_ROOT}/server1/new_stderr.log'] attr = [errFile] AdminConfig.modify(processDef, [['ioRedirect', [attr]]])
Using Jacl:
$AdminConfig modify $processDef {{execution {{processPriority 15}}}}
Using Jython:
AdminConfig.modify(processDef, [['execution', [['processPriority', 15]]]])
Using Jacl:
$AdminConfig modify $processDef {{monitoringPolicy {{maximumStartupAttempts 1}}}}
Using Jython:
AdminConfig.modify(processDef, [['monitoringPolicy', [['maximumStartupAttempts', 1]]]])
Related concepts
AdminConfig object for scripted administration
Related reference
Commands for the AdminConfig object