Friday, May 23, 2014

Deployment plan file to replace the Binding Adapter Properties/Attributes – Oracle SOA Suite

Deployment plan file to replace the Binding Adapter Properties/Attributes – Oracle SOA Suite

The deployment plan file will help us to dynamically replace the Oracle SOA Suite Composite properties.

This post explain the steps to replace the Properties/Attributes of the Direct Binding Adapter in Composite.xml. The same steps can be used to replace the Properties/Attributes of all the Binding Adapters.

Generate the Plan file:

The plan file can be generated through JDeveloper or through ANT script.

Generating Plan file through JDeveloper:

Right Click on Composite.xml and click on generate config Plan.


Change the generated plan file contents accordingly to replace the properties and attributes of the composites. 

Add the required attributes to the corresponding Binding and change the values accordingly(by default the attributes will not be added to the corresponding binding in the plan file) and also change the value of required properties accordingly.

Composite.xml



Plan.xml


<?xml version="1.0" encoding="UTF-8"?>
<SOAConfigPlan xmlns:jca="http://platform.integration.oracle/blocks/adapter/fw/metadata" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy" xmlns:edl="http://schemas.oracle.com/events/edl" xmlns="http://schemas.oracle.com/soa/configplan">
   <composite name="DirectBinding">     
      <reference name="DReference1">
        <binding type="direct">
          <attribute name="address">
               <replace>sb:/SBProtocol2</replace>
            </attribute>
            <attribute name="useLocalJNDIProvider">
               <replace>true</replace>
            </attribute>
            <property name="java.naming.provider.url">
               <replace>t3://localhost:8001</replace>
            </property>
         </binding>
      </reference>
   </composite>
</SOAConfigPlan>


Attaching the plan file while deploying the composite from JDeveloper:





The plan file can be attached through ant script during the deployment of the composite to the server.

    <ant antfile="${oracle.home}/bin/ant-sca-deploy.xml" inheritAll="false"
             target="deploy">
            <property name="wl_home" value="${wl_home}"/>
            <property name="oracle.home" value="${oracle.home}"/>
            <property name="serverURL" value="${soa.cluster.serverURL}"/>
            <property name="user" value="${soa.user}"/>
            <property name="password" value="${soa.password}"/>
            <property name="overwrite" value="${soa.composite.overwrite}"/>
            <property name="forceDefault" value="${soa.composite.forceDefault}"/>
            <property name="sarLocation" value="${deploy.sarLocation}"/>
            <property name="configplan" value="${deploy.configplan}"/>
        </ant>

Verify the Properties/Attributes after deployment through EM console.


No comments:

Post a Comment