Saturday, October 6, 2012

Deployment plan file to replace the JCA Adapters properties – Oracle SOA Suite

Deployment plan file to replace the JCA Adapters properties – Oracle SOA Suite 11g

This post will explain how to use deployment plan file to replace the JCA Adapters properties in Oracle SOA Suite 11g and Oracle SOA Suite 12c.

We can create and edit a configuration plan file in which we can replace the following attributes and properties:
  •  Any composite, service component, reference, service, and binding properties in the SOA composite application file (composite.xml)
  • Attribute values for bindings (for example, the location for
  • schemaLocation attribute of an import in a WSDL file
  • location attribute of an include in a WSDL file
  • schemaLocation attribute of an include, import, and redefine in an XSD file
  • Any properties in JCA adapter files
The configuration plan does not alter XSLT artifacts in the SOA composite application. If you want to modify any XSL, do so in the XSLT Mapper. Using a configuration plan is not useful. For example, you cannot change references in XSL using the configuration plan file. Instead, they must be changed manually in the XSLT Mapper in Oracle JDeveloper when moving to and from test, development, and production environments.

The same steps will work in Oracle SOA Suite 12c but the screens will be little different.

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.
Change the wsdlAndSchema section accordingly to replace the WSDL location and the schemaLocation of the WSDL’s and XSD’s

   <wsdlAndSchema name="ExplorePlanFile.wsdl|FileAdapter_file.jca|FileAdapter.wsdl|xsd/AA_table.xsd|xsd/ExplorePlanFile.xsd">

By default the wsdlAndSchema section will include the jca files to replace the JCA file properties.
The default configuration as shown below is not replacing the jca properties after the deployment of the composite.

<wsdlAndSchema name="FileAdapter_file.jca|FileAdapter.wsdl|xsd/AA_table.xsd|xsd/ExplorePlanFile.xsd">
  <replace>D://Albin/Files/Sample</replace>      </searchReplace>

The same should be changed as shown below to replace the JCA adapter properties 

File Adapter properties:

<wsdlAndSchema name="FileAdapter_file.jca">
      <jca:property name="PhysicalDirectory">
       <jca:property name="Append">

MQ Adapter properties:

<wsdlAndSchema name="ENQ_GE_EI_EAI_TRIGGER_mq.jca|OrderStatusMonitorMQAdp_mq.jca">
                <jca:property name="QueueName">                  

The same searchReplace can be used to replace all the JCA adapters’ properties.

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"
            <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}"/>


  1. Hi
    Hey is any way to change the XML....I have to change sensor action xml file with new jms location.Right now I am usinf this and its not working

    jms/Desktop/demobam/1_0/queue jms/TestRemote/demobam/1_0/queue

    I think this just wok form XSD but not for XML....Any idea about change the XML using configuration plan.


  2. jms/Desktop/demobam/1_0/queue jms/TestRemote/demobam/1_0/queue


  3. Can we replace Revision number through config plan?

    1. No, the revision number will not be able to replaced through config plan

  4. JNDI is not replacing when am deploying using config.xml and other preference variable are reflecting only issue on JCA adapter properties could you help on this.

    1. why you want to replace the JNDI - better to have same JNDI across all the environments with different properties. Let me know if the JCA properties are not getting replaced.

  5. Just created file adapter using mediator and than configure with DB Adapter that was running fine but I want to replace table with another table(different host) using configuration plan in Service Oriented Architecture(SOA) suite 12c. could you help on this?