websphere jacl script to manage server lifecycle

ibm websphere

Below JACL function can be used to Check server is up or not and Start Server if it is not running. I made this script to autodeploy ear files to websphere. Below script is part of it total auto deployment functions.

proc chk_startServer {} {

puts “checklist: — checking to see if server $serverName is already running on node $nodeName”
set runningServer [$AdminControl completeObjectName type=Server,node=$nodeName,process=$serverName,*]
if { [llength $runningServer] > 0 } {
puts “checklist: — Server $serverName running on node $nodeName”
return 1
} else {
puts “checklist: — Server $serverName is not running …”
puts “checklist: — starting server $serverName …”
$AdminControl startServer $serverName $nodeName
puts “checklist: — done.”
return 1
}}

$nodeName and $serverName needs to be replaced by the real values.

In case of any ┬ęCopyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply