Specifying Polling Options Specifying Advanced Options

9-26 Oracle Fusion Middleware Users Guide for Technology Adapters Native Sequencing Oracle only allows you to specify that the primary key will be assigned from a sequence on any insert. Click Search and then select a sequence from the Sequence list, or type the name and click Create. For more information about specifying advanced options, click Help in the Advanced Options page or press F1.

9.2.13 Entering the SQL String for the Pure SQL Operation

You can enter a SQL string for performing the Execute Pure SQL operation in the Custom SQL page. Figure 9–28 shows the Adapter Configuration Wizard - Custom SQL page. Figure 9–28 Entering a SQL String In the SQL field, enter a custom SQL string. An XSD schema of your SQL input is automatically created in the XSD field. The XSD field displays the XSD schema of the custom SQL string you entered. You can directly edit the resulting XSD. However, if you make subsequent changes to the SQL string, then your XSD changes are lost. For more information about entering a SQL string, click Help in the Custom SQL page or press F1.

9.3 Oracle Database Adapter Features

This section discusses the Oracle Database Adapter features. Oracle JCA Adapter for Database 9-27 It includes the following topics: ■ Section 9.3.1, Transaction Support ■ Section 9.3.2, Pure SQL - XML Type Support ■ Section 9.3.3, Row Set Support Using a Strongly or Weakly Typed XSD ■ Section 9.3.4, Proxy Authentication Support ■ Section 9.3.5, Streaming Large Payload ■ Section 9.3.6, Schema Validation ■ Section 9.3.7, High Availability ■ Section 9.3.8, Scalability ■ Section 9.3.9, Performance Tuning ■ Section 9.3.10, detectOmissions Feature ■ Section 9.3.11, OutputCompletedXml Feature ■ Section 9.3.12, QueryTimeout for Inbound and Outbound Transactions ■ Section 9.3.13, Doing Synchronous Post to BPEL Allow In-Order Delivery

9.3.1 Transaction Support

The Oracle Database Adapter enables transaction support, which, along with the inherent data processing, ensures that each modification has a clearly defined outcome, resulting in either success or failure, thus preventing potential corruption of data, executes independently from other changes, and, once completed, leaves underlying data in the same state until another transaction takes place. There are two types of transaction support, XA Transaction support and Local Transaction support. XA transaction support allows a transaction to be managed by a transaction manager external to a resource adapter, whereas, a local transaction support allows an application server to manage resources that are local to the resource adapter. To ensure two Oracle Database Adapter invokes commit or rollback as a unit, you need to perform the following: ■ Both Oracle Database Adapter invokes must be configured to participate in global transactions. ■ Both Oracle Database Adapter invokes must participate in the same global transaction. ■ The failure of either invoke must cause the global transaction to roll back.

9.3.1.1 Configuring Oracle Database Adapter for Global Transaction Participation

In the deployment descriptor weblogic-ra.xml file, you must set the xADataSourceName parameter. Additionally, the referenced DataSource must be configured for transaction participation by creating a data source in Oracle WebLogic Server Console. Note: You must use a non-XA driver with the SOALocalTxDataSource parameter. Switching to an XA driver breaks product functionality. 9-28 Oracle Fusion Middleware Users Guide for Technology Adapters You must create a data source and choose one of the XA data sources from the list. For information about the recommended setting for non-XA and XA data sources used by Oracle JCA Adapters, see Section 2.21, Recommended Setting for Data Sources Used by Oracle JCA Adapters. Note that you cannot edit the data-sources.xml file in the Oracle WebLogic Server. You must create a data source by using the Oracle WebLogic Server Administration Console, as mentioned in Section 2.19.1, Creating a Data Source.

9.3.1.2 Both Invokes in Same Global Transaction

Once both the Oracle Database Adapter invokes participate in global transactions, to commit or rollback as a unit, they must be participating in the same global transaction. In BPEL, this requires the understanding of where the transaction boundaries are, at what points does a checkpoint have to write to the dehydration store, commit the current global transaction, and start a new one. The transaction boundaries in a BPEL process occur either before a Receive activity or wait activity, or before an onMessage or pick activity. This may also occur when invoking a synchronous child BPEL process, unless the bpel.config.transaction property is set on the partnerlink, as shown in the following code sample. property name=bpel.config.transactionrequiredproperty Otherwise, the parent process is broken into two transactions and the child process runs in its own transaction.

9.3.1.3 Failure Must Cause Rollback

Finally, even if both Oracle Database Adapter invokes participate in the same global transaction, the failure of either invoke may not cause the global transaction to rollback. The only cases where a failure can actually cause a global rollback are: ■ A Oracle Database Adapter operation that insertsupdates multiple tables as part of one invoke fails after having succeeded in some writes but not others. In this case, the Oracle Database Adapter marks the global transaction as rollback only, because the invoke operation was not atomic and a commit could cause data corruption. ■ The invoke retries multiple times in a database down scenario, until the global transaction times out and is rolled back. ■ An explicit bpelx:rollback fault is thrown from within the BPEL process.

9.3.1.3.1 Using the Same Sessions for Both Invokes

You must set the GetActiveUnitOfWork JCA parameter to true to enable using the same sessions or connections for both the Oracle Database Adapter invokes. GetActiveUnitOfWork is an advanced JCA property you can set on any DBInteractionSpec. It causes the invoke to register itself with the two-phase commit callbacks, and all writes to the database are performed as part of the Note: True Database XA is only certified on Oracle 10.2.0.4 or 11.1.0.7. For earlier versions, you will be safer picking a non-XA data source implementation and selecting Emulated Two-phase commit on the next page.