Sunday, November 11, 2012

Oracle SOA 11.1.1.6 Technology Adapters: Enabling High Availability for Oracle File and FTP Adapters

Oracle SOA 11.1.1.6 Technology Adapters: Enabling High Availability for Oracle File and FTP Adapters

The Oracle File and FTP Adapters enable a BPEL process or an Oracle Mediator to read and write files on local file systems and on remote file systems through FTP (File Transfer Protocol). These adapters support high availability for an active-active topology with Oracle BPEL Process Manager and Oracle Mediator service engines for both inbound and outbound operations. To make Oracle File and FTP Adapters highly available for outbound operations, use the database mutex locking 


Note:
The File Adapter picks up a file from the inbound directory, processes it, and then outputs a file to the output directory. Because the File Adapter is non-transactional, files can be processed twice. As a result, it is possible to get duplicate files when there is failover in the RAC backend or in the SOA managed servers.

Using the Database Mutex Locking Operation

Make an outbound Oracle File or FTP Adapter service highly available using database table as a coordinator.
The steps and configuration options for the FTP adapter are exactly the same as the options for the file adapter. The connection factory to be used for FTP HA configuration iseis/Ftp/HAFtpAdapter which appears under the Outbound Connection Pools for the FTPAdapter deployment.


To make outbound Oracle File or FTP Adapters highly available, modify Oracle File Adapter deployment descriptor for the connection-instance corresponding to eis/HAFileAdapter from the Oracle WebLogic Server console:
  1. Log into your Oracle WebLogic Server console. To access the console navigate to the following URL:
    http://servername:portnumber/console
    
  2. Click Deployments in the left pane for Domain Structure.
  3. Click FileAdapter under Summary of Deployments on the right pane.
  4. Click the Configuration tab.
  5. Click the Outbound Connection Pools tab, and expand javax.resource.cci.ConnectionFactory to see the configured connection factories.
  6. Click on Lock & Edit.

    After this, the property value column becomes editable (you can click on any of the rows under "Property Value" and modify its value).
    The new parameters in connection factory for Oracle File and FTP Adapters are as follows:
    controlDir: Set it to the directory structure where you want the control files to be stored. You must set it to a shared location if multiple WebLogic Server instances run in a cluster. Structure the directory for shared storage as follows:
    ORACLE_BASE/admin/domain_name/cluster_name/fadapter
    
    inboundDataSource: Set the value to jdbc/SOADataSource. This is the data source, where the schemas corresponding to high availability are pre-created. The pre-created schemas can be found in the following directory:
    ORACLE_HOME/rcu/integration/soainfra/sql/adapter/createschema_adapter_oracle.sql
    
    If you want to create the schemas elsewhere, use this script. You must set the inboundDataSource property accordingly if you choose a different schema.
    outboundDataSource: Set the value to jdbc/SOADataSource. This is the data source where the schemas corresponding to high availability are pre-created. The pre-created schemas are located in the following directory:
    ORACLE_HOME/rcu/integration/soainfra/sql/adapter/createschema_adapter_oracle.sql
    
    If you want to create the schemas elsewhere, use this script. You must set the outboundDataSource property if you choose to do so.
    outboundDataSourceLocal: Set the value to jdbc/SOALocalTxDataSource. This is the datasource where the schemas corresponding to high availability are pre-created.
    outboundLockTypeForWrite: Set the value to oracle if you are using Oracle Database. By default the Oracle File and FTP Adapters use an in-memory mutex to lock outbound write operations. You must choose from the following values for synchronizing write operations:
    memory: The Oracle File and FTP Adapters use an in-memory mutex to synchronize access to the file system.
    oracle: The adapter uses Oracle Database sequence.
    db: The adapter uses a pre-created database table (FILEADAPTER_MUTEX) as the locking mechanism. You must use this option only if you are using a schema other than the Oracle Database schema.
    user-defined: The adapter uses a user-defined mutex. To configure the user-defined mutex, you must implement the mutex interface: "oracle.tip.adapter.file.Mutex" and then configure a new binding-property with the name"oracle.tip.adapter.file.mutex" and value as the fully qualified class name for the mutex for the outbound reference.
  7. Click Save after you update the properties. The Save Deployment Plan page appears.
  8. Enter a shared storage location for the deployment plan. The directory structure is as follows:
    ORACLE_BASE/admin/domain_name/cluster_name/dp/Plan.xml
    
  9. Click Save and Activate.
  10. Once the new deployment plan has been saved and activated, activate the FileAdapter deployment (the deployment remains in Prepared state if not started). To activate the FileAdapter deployment plan:
    In the Administration Console, click Deployments in the left pane for Domain Structure.
    Select the FileAdapter under Summary of Deployments on the right pane and Select Start, and then Servicing All Requests.
  11. Configure BPEL Process or Mediator Scenario to use the connection factory as shown in the following example (in the jca file included in the composite for the binding component):
    <adapter-config name="FlatStructureOut" adapter="File Adapter" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
      <connection-factory location="eis/HAFileAdapter" adapterRef=""/>
      <endpoint-interaction portType="Write_ptt" operation="Write">
    <interaction-spec className="oracle.tip.adapter.file.outbound.FileInteractionSpec">
          <property../>
          <property../>
        </interaction-spec>
      </endpoint-interaction>
    </adapter-config>
  12. Click eis/HAFileAdapter. The Outbound Connection Properties for the connection factory corresponding to high availability is displayed.






No comments:

Post a Comment

ForgeRock IAM : OpenDS (Open Directory Server). Importing LDIF files

The most efficient method of importing LDIF data is to take the OpenDJ server offline. Alternatively, you can schedule a task to import the ...