Example: Configuring for processes using wsadmin
The following example modifies the process definition of a server:
- Identify the server and assign it to the server1 variable:
set server1 [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]Example output:
server1(cells/mycell/nodes/mynode/servers/server1:server.xml#Server_1)- Identify the process definition belonging to this server and assign it to the processDef variable:
set processDef [$AdminConfig list JavaProcessDef $server1] set processDef [$AdminConfig showAttribute $server1 processDefinition]Example output:
(cells/mycell/nodes/mynode/servers/server1:server.xml#JavaProcessDef_1)- Change the attributes.
- This example changes the working directory:
$AdminConfig modify $processDef {{workingDirectory c:/temp/user1}}- This example modifies the stderr file name:
set errFile [list stderrFilename \${LOG_ROOT}/server1/new_stderr.log] set attr [list $errFile] $AdminConfig modify $processDef [subst {{ioRedirect {$attr}}}]- This example modifies the process priority:
$AdminConfig modify $processDef {{execution {{processPriority 15}}}}- This example changes the maximum startup attempts:
$AdminConfig modify $processDef {{monitoringPolicy {{maximumStartupAttempts 1}}}}You can modify this example to change other attributes in the process definition object.
- Save the changes with the following command:
$AdminConfig save