Script for Configuring websphere process definition
#---------------------------------------------------------------------------------------- #-- Configuring websphere process definition #---------------------------------------------------------------------------------------- set aServer [$AdminConfig getid /Node:myNode/Server:newServer/] set aProcessDef [$AdminConfig showAttribute $aServer processDefinition] puts "Set up various properties" # setting up working directory property set workingDirAttr [list workingDirecotry \${WAS_HOME}] # setting up JVM heap size properties in number of megabytes set initHeapAttr [list initialHeapSize 80] set maxHeapAttr [list maximumHeapSize 512] set jvmAttrs [list $initHeapAttr $maxHeapAttr] # setting up process execution priority set priorityAttr [list processPriority 10] set processExeAttrs [list $priorityAttr] # setting up a new environment entry set nameAttr [list name envEntry1] set valueAttr [list value value1] set descAttr [list description "A dummy environment entry"] set envAttrs [list $nameAttr $valueAttr $descAttr] # setting up monitoring policy set maxStartupAttr [list maximumStartupAttempts 4] # ping interval is specified in number of seconds set pingIntervalAttr [list pingInterval 50] set monitorPolicyAttrs [list $maxStartupAttr $pingIntervalAttr] # Modify process definition with the above setup puts "Modify general properties of process definition" $AdminConfig modify $aProcessDef [list $workingDirAttr] 31 puts "Modify JVM properties" set jvms [lindex [$AdminConfig showAttribute $aProcessDef jvmEntries] 0] foreach $aJVM $jvms { $AdminConfig modify $aJVM $jvmAttrs puts [$AdminConfig show $aJVM] } puts "Modify process execution properties" set execution [$AdminConfig showAttribute $aProcessDef execution] $AdminConfig modify $execution $processExeAttrs puts [$AdminConfig show $execution] puts "Add an environment entry" puts [$AdminConfig create Property $aProcessDef $envAttrs] puts "Modify monitoring policy" set monitorPolicy [$AdminConfig showAttribute $aProcessDef monitoringPolicy] $AdminConfig modify $monitorPolicy $monitorPolicyAttrs puts [$AdminConfig show $monitorPolicy] $AdminConfig save
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.