Thursday, 21 October 2010

changing start weight of apps in WAS server.

Pls note these jacl scripts works for IBM WPS/ESB and any Websphere App server.

Note: Pls see above post on JACL to see how it can be executed. 

  #----------------------------------------------------------------------------------------
  # This script will set- All App's startingWeight to 30.
  #-----------------------------------------------------------------------------------------
 
 
#--------------------------------------------------------------

      global AdminConfig
      global AdminApp   

    # Find all the installed applications
    #--------------------------------------------------------------

        puts " " 
        puts " Script PP_CORE_1 starting..  " 
    
        set apps [$AdminApp list]         
        puts "  "

      foreach appNam $apps {

        set dep [$AdminConfig getid /Deployment:$appNam/]
        set depObject [$AdminConfig showAttribute $dep deployedObject]            
       

        $AdminConfig modify $depObject {{startingWeight 30}}
        $AdminConfig save 
        set StartWeight [$AdminConfig show $depObject startingWeight]         


        puts " Successfully updated $appNam  $StartWeight "   
        puts "  "
        puts "  "
                         

     }      
  
        puts " Script PP_CORE_1 executed successfully... " 

 #---------------------------------------------------------

No comments:

Post a Comment