#---------------------------------------------------------
proc readCustomProps {inputFilename customProps} {
#---------------------------------------------------------
puts " "
puts "################################################"
puts "# readCustomProps - [mydate]"
puts "################################################"
if [catch {open $inputFilename r} FP] {
puts "==> ERROR: Unable to open file $inputFilename: $FP"
return -code break
}
set i 0
while {[gets $FP line] >= 0} {
incr i
regexp {([^=]+)=([^=]+)} $line match variable value
set variable [string trim $variable]
set value [string trim $value]
lappend customProps [list [list name $variable] [list required true] [list value $value]]
}
puts "==> Read $i values.\n"
close $FP
return -code ok
}
##############
# MAIN PROGRAM
##############
set inputFilename "myinputs.txt"
# Get custom properties from file
readCustomProps $inputFilename $customProps
set cellName "was9Cell"
set nodeName "was9Node"
set appServerName "myapp_was9_application"
set as [$AdminConfig getid /Cell:$cellName/Node:$nodeName/Server:$appServerName/]
set jvm [$AdminConfig list JavaVirtualMachine $as]
$AdminConfig modify $jvm [subst {{systemProperties {$customProps}}}]
阅读(2016) | 评论(0) | 转发(0) |