Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2039393
  • 博文数量: 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 17:16:20

###  
### set_JVM.jacl  
###  
###  
###  
###  
###  
  
proc set_JVM {cname nname sname classpath} {  
  
  
###  
### set up globals  
###  
  
global AdminConfig  
global AdminControl  
global AdminApp  
  
set serverid [$AdminConfig getid /Cell:$cname/Node:$nname/Server:$sname/]  
  
if {[llength $serverid] == 0} {  
    puts "Serverid null - returning "  
    exit   
}  
  
###   
### Identify the JVM id belonging to the server   
###   
  
set jvm [$AdminConfig list JavaVirtualMachine $serverid]
  
  
###   
### Configure JVM
###   
  
$AdminConfig modify $jvm  [list  [list bootClasspath  [list  ] ] \
 [list classpath $classpath] \
 [list debugArgs "-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777" ] \
 [list debugMode false ] \
 [list disableJIT false ] \
 [list initialHeapSize 0 ] \
 [list maximumHeapSize 512 ] \
 [list runHProf false ] \
 [list systemProperties  [list  [list  [list name db2j.system.home ] \
 [list required false ] \
 [list value /opt/WebSphere/AppServer/properties ] ]  [list  [list name java.security.auth.login.config ] \
 [list required false ] \
 [list value /opt/WebSphere/AppServer/properties/wsjaas.conf ] ]  [list  [list name java.security.policy ] \
 [list required false ] \
 [list value /opt/WebSphere/AppServer/properties/server.policy ] ]  [list  [list name log4j.configuration ] \
 [list required false ] \
 [list value log4j.xml ] ]  [list  [list name acme.home ] \
 [list required false ] \
 [list value $classpath ] ]  [list  [list name server.root ] \
 [list required false ] \
 [list value /opt/WebSphere/AppServer ] ] ] ] \
 [list verboseModeClass false ] \
 [list verboseModeGarbageCollection false ] \
 [list verboseModeJNI false ] ]
 
  
$AdminConfig save  
### Synchronize nodes
set Sync1 [$AdminControl completeObjectName type=NodeSync,node=$nname,*]
set xstatus [$AdminControl invoke $Sync1 sync]
puts $xstatus
if {$xstatus == "false"} {
    puts "Unable to synchronize..."
}
  
}  
  
  
  
###  
### Main  
###  
  
  
if { !($argc == 4) } {  
   puts ""  
   puts "Usage:  "  
   puts " "  
   puts "wsadmin.sh -username system -password password -f set_JVM.jacl cellname nodename servername classpath"
   puts ""  
   puts "For example:  "  
   puts " "  
   puts "wsadmin.sh -username was -password acme@ -f  set_JVM.jacl hostnameNetwork hostname ops_1_1 classpath"
} else {   
   set xcell        [lindex $argv 0]    
   set xnode        [lindex $argv 1]    
   set xserver      [lindex $argv 2]    
   set xclasspath       [lindex $argv 3]    
   set_JVM $xcell $xnode $xserver $xclasspath  
}  
阅读(1433) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~