Skip Headers
Oracle® Fusion Middleware Oracle WebLogic Scripting Tool
11g Release 1 (10.3.4)

Part Number E13715-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

7 Updating the Deployment Plan

You can use WLST to retrieve and update an application's deployment plan. When using WLST to update an application's deployment plan, you define variable definitions and variable assignments. A variable definition identifies what descriptor entity is to be changed; a variable assignment associates a new value with the variable.

The following procedure describes how to use WLST in interactive mode. For information about using WLST in script or embedded mode, see Chapter 2, "Using the WebLogic Scripting Tool"

To update a deployment plan using WLST in interactive mode, perform the following steps:

Note:

The example code provided in the following procedure demonstrates how to update and configure Web services reliable messaging. For more information, see "Using Web Services Reliable Messaging" in Programming Advanced Features of JAX-RPC Web Services for Oracle WebLogic Server.
  1. Create a deployment plan for the application.

    For more information, see "Create a deployment plan" in the Oracle WebLogic Server Administration Console Help.

  2. Start WLST in interactive mode.

  3. Start the WebLogic Server instance to which the application is deployed. For more information, see "Starting and Stopping Servers" in Managing Server Startup and Shutdown for Oracle WebLogic Server.

  4. Connect to the WebLogic Server instance. For example:

    connect("weblogic", "welcome1", "t3://localhost:7001")
    
  5. Load the application and deployment plan. For example:

    plan=loadApplication("c:/myApps/ReliableServiceEar/examples/webservices/
    reliable/ReliableHelloWorldImpl.war", "c:/myApps/ReliableServiceEar/Plan.xml")
    

    The WLST loadApplication command returns a WLSTPlan object that you can access to make changes to the deployment plan. For more information about the WLSTPlan object, see WLSTPlan Object.

  6. Identify the configuration options that you want to update and their corresponding XPath values.

  7. Determine if variable definitions and variable assignments are currently defined in your deployment plan for the configuration options identified in the previous step. To do so, enter one of the following commands:

    1. To display variables:

      plan.showVariables()
      Name                                        Value
      -----                                       -----
      ReliabilityConfig_AcknowledgementInterval   P0DT0.5S
      Wsdl_Exposed                                true
      
    2. To display variable assignments:

      plan.showVariableAssignments()
      
      examples/webservices/reliable/ReliableHelloWorldImpl.war
         |
        WEB-INF/weblogic-webservices.xml
           |
          Wsdl_Exposed
      
      examples/webservices/reliable/ReliableHelloWorldImpl.war
         |
        WEB-INF/weblogic-webservices.xml
           |
          ReliabilityConfig_AcknowledgementInterval   |
      
  8. If the variable definition and assignment are not defined, create them and set the XPath value for the variable assignment, as follows:

    1. Create the variable definition. Use the createVariable() method to specify the variable name and value. For example:

      v=plan.createVariable("ReliabilityConfig_BufferRetryCount", "3")
      
    2. Create the variable assignment. Use the createVariableAssignment() method to specify the name of the variable, the application to which is applies, and the corresponding deployment descriptor. For example:

      va=plan.createVariableAssignment("ReliabilityConfig_BufferRetryCount", 
      "ReliableServiceEar", "META-INF/weblogic-application.xml")
      
    3. Set the XPath value for the variable assignment. For example:

      va.setXpath("/weblogic-webservices/webservice-description/
      [webservice-description-name="examples.webservices.reliable.Reliable
      HelloWorldImpl"]/port-component/[port-component-name=
      "ReliableHelloWorldServicePort"]/reliability-config/buffer-retry-count")
      
  9. Save the deployment plan. For example:

    plan.save()