Transactions in Oracle SOA Suite 12c

Transaction Semantics
Oracle SOA Suite uses the underlying Java Transaction API (JTA) infrastructure to handle its transactions.

Oracle BPEL process manager creates a new transaction on a request basis. If a transaction exists, then it is suspended, otherwise it is created.

In order to configure the transaction behaviour for a BPEL process, you must set a property named "bpel.config.transaction" in the component section of the composite.xml with one of the following values:

  • required (default value)
  • requiresNew
  • notSupported

For example:
<component name="LocationHandlerProcess" version="2.0">
    <implementation.bpel src="BPEL/LocationHandlerProcess.bpel"/>
    <property name="bpel.config.transaction" type="xs:string"many="false">required | requiresNew | notSupported</property>
</component>

Synchronous invocations
When the bpel.config.transaction is set to required, then the caller's transaction is joined (if there is one) or a new transaction is created (if there is not one).

When the bpel.config.transaction is set to requiresNew, then a new transaction is always created and an existing transaction (if there is one) is suspended.

One-Way invocations
For one-way invocations you can use the bpel.config.oneWayDeliveryPolicy property, which can take one of the following values:

  • async.persist: Messages are persisted in the database, but there is a performance impact.
  • async.cache: Choose if you prefer performance over reliability, messages are kept in the in-memory cache only. In case of server failure or high rate incoming messages, messages can be lost.
  • sync: Invocation occurs in the same thread, the service is invoked synchronously

Again, this property is set within the component section of the composite.xml:
<property name="bpel.config.oneWayDeliveryPolicy" type="xs:string" many="false">async.persist</property>

BPEL process with no transaction
To execute a BPEL process without a transaction, you may set the bpel.config.transaction property to notSupported. In this case, the following apply:

  • XA distributed transaction benefits seize to exist.
  • You cannot invoke any partnerLink that requires a transaction (TransactionAttribute=MANDATORY).
  • The invocation is fire and forget.
In-Memory BPEL process
To further improve your business process execution performance, you can configure your process to completely run in-memory. WebLogic utilizes Coherence cache to achieve this and greatly reduces continuous disk reads and writes.

To achieve this, you can use the bpel.config.completionPersistPolicy property, which can take one of the following values:

  • Immediate: As if the in-memory option is not enabled.
  • Deferred: A write-behind thread wakes up at periodic intervals, by default every 5 mins, and writes data to the database. After this, the instance should show up on the enterprise manager.
  • Faulted: Except from faulted instances, no other instance should be shown on the enterprise manager.
For more details, have a look here.

Comments