Oracle JCA Adapters Reliability and Transactional Behavior

5-62 Oracle Fusion Middleware High Availability Guide

5.10.1.1 Oracle JCA Adapters Component Lifecycle

The lifecycle of an adapter is controlled by the Oracle SOA Service Infrastructure. There are three high-level steps in the initialization of an Oracle JCA Adapter: ■ Deployment : Oracle JCA Adapters are deployed during installation as J2CA 1.5 resource adapters RAR files within the same Oracle WebLogic Server container as Oracle Fusion Middleware. The physical deployment of adapters involves using the RAR file and registering the adapters as connectors with the underlying Oracle WebLogic Server, or the middle tier platform. The RAR file contains the ra.xml file, which contains declarative information about the contract between Oracle WebLogic Server and the resource adapter. In addition, the RAR file contains weblogic-ra.xml which is the deployment descriptor file containing deployment-specific information about the resource adapter. ■ Loading : Loading refers to the process of creating in-memory resources and creating connections to the configured end-point. Although Oracle JCA Adapters are physically deployed as J2CA 1.5 resource adapters, their logical deployment involves creating the Connection Factory entries for the J2CA 1.5 resource adapter by editing the weblogic-ra.xml file. This file is Oracle WebLogic Server-specific deployment descriptor for a resource adapter. It contains configurations for deploying resource adapters to Oracle WebLogic Server, which includes the back-end application connection information as specified in the deployment descriptor of the resource adapter, Java Naming and Directory Interface JNDI name to be used, connection pooling parameters, resource principal mapping mechanism, and configurations. ■ Activation : Activation refers to initiation of a JCA binding component Service and Reference within a Composite. Listeners are started for the endpoint referenced by the Adapter configuration within the Composite. Property Changes During Oracle JCA Adapters Runtime Oracle JCA Adapters expose the underlying back-end operation-specific properties as header properties and allow the manipulation of these elements within a business process.The underlying properties are as follows: ■ interactionspec or activationspec Properties - These properties require the adapter endpoint to be recycled re-activated. ■ Endpoint Properties - Changes to these properties are notified to the adapter without requiring the endpoint to be restarted.

5.10.1.2 Oracle JCA Adapters Reliability and Transactional Behavior

Oracle JCA Adapters support global transactions based on the JCA 1.5 XA contracts that leverage the underlying application server transaction manager. Adapters supporting XA transactions include Oracle Adapters for Oracle Applications, database, Advanced Queuing, JMS and MQSeries. Non-transactional adapters include Oracle File Adapter and Oracle FTP Adapter. Inbound Transactions For a synchronous process, the global transaction initiated by the adapter spans message delivery and composite execution. For an asynchronous service entry point, a transactional adapter initiates a global JTA transaction before sending an inbound message to a composite. When control returns to the adapter, it commits the JTA transaction, executing the following set of actions as an atomic unit of work: Configuring High Availability for Oracle Fusion Middleware SOA Suite 5-63 1. Commit the removal of the message from the inbound adapter endpoint, for example, table and queue. 2. Commit the execution of the composite instance. If anything fails during this process, both of these actions are rolled back based on XA guarantees. Outbound Transactions For transactional adapters, outbound JCA interactions the invoke activities are scoped with the global JTA transaction of the Composite instance. This means that all composite activities, including Oracle JCA adapter invocations, are part of a global transaction, and as such all activities are either committed or rolled back if an error occurs. Therefore, one can guarantee exactly-once message delivery when both inbound and outbound adapters are transactional and the connection factories have been configured to support XA global transactions. Nontransactional The Oracle File Adapter picks up a file from an inbound directory, processes the file, and sends the processed file to an output directory. However, during this process if a failover occurs in the Oracle RAC backend or in an SOA managed server, then the file is processed twice because of the nontransactional nature of Oracle File Adapter. As a result, there can be duplicate files in the output directory.

5.10.1.3 Oracle JCA Adapters - Rejected Message Handling