Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2039417
  • 博文数量: 519
  • 博客积分: 10070
  • 博客等级: 上将
  • 技术积分: 3985
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-29 14:05
个人简介

只问耕耘

文章分类

全部博文(519)

文章存档

2016年(1)

2013年(5)

2011年(46)

2010年(220)

2009年(51)

2008年(39)

2007年(141)

2006年(16)

我的朋友

分类:

2008-01-09 15:37:55

#---------------------------------------------------------
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}}}]
 
阅读(1978) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~