Index by: file name |
procedure name |
procedure call |
annotation
startAll_proc.tcl
(annotations | original source)
####################################################################
# Start all servers and node agents that are not running.
####################################################################
proc stopAll { } {
global AdminConfig
global AdminControl
# display procedure arguments.
set procName [ lindex [ info level 0 ] 0 ]
putsLog "## proc - $procName"
foreach i [ info args $procName ] {
upvar 0 $i ilocal
set propertiesArray($i) $ilocal
}
putsLog "procedure arguments are................."
foreach { a b } [ array get propertiesArray ] {
putsLog [ format "%-35s %s" "$a" "$b" ]
}
set cellName [ $AdminControl getCell ]
# get the running servers which will not need to be started.
# the deployment manager is running so there will be at least one server in the list.
foreach i [ $AdminControl queryNames type=Server,* ] {
lappend serverList [ list [ $AdminControl getAttribute $i name ] [ $AdminControl getAttribute $i processType ] ]
}
# display the running servers
putsLog "running servers are .............."
foreach i $serverList { putsLog [ format "%-5s %-15s %-15s" " " [ lindex $i 0 ] [ lindex $i 1 ] ] }
# get a list of the configured servers
foreach i [ $AdminConfig list Server ] {
lappend serverConfigList [ $AdminConfig showAttribute $i name ]
}
# list the servers by category.
foreach i $serverList {
if { [ lindex $i 1 ] == "ManagedProcess" } {
lappend jvmList [ lindex $i 0 ]
}
if { [ lindex $i 1 ] == "NodeAgent" } {
lappend nodeAgentList [ lindex $i 0 ]
}
if { [ lindex $i 1 ] == "DeploymentManager" } {
lappend dmList [ lindex $i 0 ]
}
}
# stop the application servers.
if { [ info exist jvmList ] == 1 } {
foreach i $jvmList {
if { [ catch { $AdminControl stopServer [ lindex $i 0 ] } r ] == 0 } {
putsLog "[ string range $r [ string first WAS $r ] end ]"
} else {
putsLog "[ string range $r [ string first WAS $r ] end ]"
putsLog $r
return -code error $r
}
}
}
# stop the node agents.
if { [ info exist nodeAgentList ] == 1 } {
foreach i $nodeAgentList {
if { [ catch { $AdminControl stopServer [ lindex $i 0 ] immediate } r ] == 0 } {
putsLog "[ string range $r [ string first WAS $r ] end ]"
} else {
putsLog "[ string range $r [ string first WAS $r ] end ]"
putsLog $r
return -code error $r
}
}
}
# stop the deployment manager.
# NB: this will require a manual restart
if { [ catch { $AdminControl stopServer [ lindex $dmList 0 ] immediate } r ] == 0 } {
putsLog "[ string range $r [ string first WAS $r ] end ]"
} else {
putsLog "[ string range $r [ string first WAS $r ] end ]"
putsLog $r
return -code error $r
}
}
Index by: file name |
procedure name |
procedure call |
annotation
File generated 2007-08-07 at 13:42.