1 Reply Latest reply: Jun 29, 2013 10:53 AM by souvik_das RSS

    Updating the targets of a running application

    epapose

      I have an application that is currently running in a domain configured with 4 managed servers - Server1, Server2, Server3 and Server4.

       

      Application is deployed to one managed server only, say Server1, and I want to use WLST to add the second server, Server2

      to the application's list of targets without interupting the client requests on the Server 1.

       

      I have tried doing this through Administration Console and recording the actions, and I see this in the recorded python script:

       

      cd('/InternalAppDeployments/APP_NAME)
      
      set('Targets',jarray.array([ObjectName('com.bea:Name=Server1,Type=Server')], ObjectName))
      
      set('Targets',jarray.array([ObjectName('com.bea:Name=Server2,Type=Server')], ObjectName))
      

       

       

      I found that if I try to include this in my own WLST script the WLST script breaks on Line 1 (above).

       

      I have also tried changing Line 1 as per below and using:

       

      cd('/AppDeployments/APP_NAME)
      
      set('Targets',jarray.array([ObjectName('com.bea:Name=Server1,Type=Server')], ObjectName))
      
      set('Targets',jarray.array([ObjectName('com.bea:Name=Server2,Type=Server')], ObjectName))
      

       

      However what happens in this case is the application is targetted only to the Server2, so it seems that Line 3 above overrides Line 2.

       

      Anyone got this to work?