Configuring PollingInterval, MaxTransactionSize, and ActivationInstances

9-36 Oracle Fusion Middleware Users Guide for Technology Adapters Then the SQL will in fact be converted to: SELECT ... WHERE ... AND MOD dbms_rowid.rowid_row_numberrowid, 2 = [01] FOR UPDATE SKIP LOCKED Since on Oracle Database skip locking already provides scalability, setting a partition field is not recommended. There is cost in terms of increased database CPU usage with more complex SQL.

9.3.8.1.3 activationInstances The adapter framework level property

activationInstances configured in composite.xml is interchangeable with NumberOfThreads for distributed scenarios. Setting activationInstances to 5 and NumberOfThreads to 5 is the same as setting one to 25 and the other to 1. As the extra work instances are created outside of the DbAdapter, they will not cooperate in any way. Hence, in a multi-threaded single node scenario, always configure NumberOfThreads only. Without database level concurrency control through enabling distributed polling, duplicates will be read. For more information, see Section 2.14, Singleton ActivePassive Inbound Endpoint Lifecycle Support Within Adapters .

9.3.8.1.4 Indexing and Null Values Try to index andor add explicit constraints on the

database for the primary and all foreign keys to joined tables. If using Logical delete polling, try to index the status column. Try to configure a non-null MarkUnreadValue and MarkReadValue. If you have no indexes at all and prefer that, you may want to go with the single node multi-threaded approach see Section 9.3.8.2, Distributed Polling Second Best Practice: Tuning on a Single Node First . That way the polling query is executed once, which may be a full table scan, but then multiple threads help to exhaust the entire result set until all rows are processed. With a distributed approach all work must be done while the rows are exclusively locked, which means locked in a timed transaction. In a distributed scenario there will be many repeated selects, which may harm performance if each one is doing a full table scan.

9.3.8.1.5 Disabling Skip Locking Skip locking has been available on Oracle Database

since 8 but is documented in 11. You may rarely come across an incompatible feature and need to disable it. In that case you can set the Oracle Database Adapter connector property usesSkipLocking to false in the ra.xml file you deploy with your application as Example 9–3 shows. Example 9–3 Configuring usersSkipLocking in ra.xml ?xml version=1.0 encoding=UTF-8? connector xmlns=http:java.sun.comxmlnsj2ee Note: In a distributed cluster scenario configuring NumberOfThreads or activationInstances has the same effect. For a non distributed scenario, you must use NumberOfThreads. Hence it is safe to always use NumberOfThreads and disregard activationInstances. Note: Performance will be very slow if MarkUnreadValue is configured as null. Oracle JCA Adapter for Database 9-37 xmlns:xsi=http:www.w3.org2001XMLSchema-instance xsi:schemaLocation=http:java.sun.comxmlnsj2ee http:java.sun.comxmlnsj2eeconnector_1_5.xsd version=1.5 ... resourceadapter outbound-resourceadapter connection-definition ... config-property config-property-nameusesSkipLockingconfig-property-name config-property-typejava.lang.Booleanconfig-property-type config-property-valuefalseconfig-property-value config-property ... connection-definition ... outbound-resourceadapter resourceadapter connector For more information on how to configure connector-level properties, see: ■ Configuring the ra.xml File in the Oracle Fusion Middleware Programming Resource Adapters for Oracle WebLogic Server ■ Packaging and Deploying Resource Adapters in the Oracle Fusion Middleware Programming Resource Adapters for Oracle WebLogic Server

9.3.8.1.6 MarkReservedValue If you are using Logical Delete polling and you set

MarkReservedValue, skip locking will not be used. Formerly, the best practice for multiple Oracle Database Adapter process instances deployed to multiple Oracle BPEL Process Manager or Oracle Mediator nodes was essentially using LogicalDeletePollingStrategy or DeletePollingStrategy with a unique MarkReservedValue on each polling node, and setting MaxTransactionSize. However with the introduction of skip locking in this release, that approach has now been superseded. If you were using this approach previously, you can simply remove in db.jca or clear Logical Delete Page of wizard the MarkReservedValue, and you will automatically get skip locking. The benefits of using skip locking over a reserved value include: ■ Skip locking scales better in a cluster and under load. ■ All work is in one transaction as opposed to updatereserve, then commit, then select in a new transaction, so the risk of a non-recoverable situation in an HA environments is minimized. ■ No unique MarkReservedValue must be specified. For this to work you had to configure a complex variable like R{weblogic.Name-2}-{IP-2}-{instance}.

9.3.8.1.7 SequencingPollingStrategy Last Read or Last Updated This distributed approach

works with Delete or Logical Delete based polling strategies. The work of the sequencing polling based strategies cannot be distributed as records are initially processed in order. For example, the second row cannot be marked as processed ahead of the first setting last read ID to 2 means not just that 2 has been processed but 1 also.