« SOA Suite 11g - Transaction(s) & boundaries; Part One | Main | Oracle Open World 2009 - Meet the SOA team .. »

SOA Suite 11g - Transaction(s) & boundaries; Part Two

Here is the second post - this time on one-way invocations:

Usually a one way invocation (with a possible callback) is exposed in a wsdl as below


<wsdl:operation name="process">
<wsdl:input message="client:OrderProcessorRequestMessage"/>
</wsdl:operation>

This will cause the bpel engine to split the execution into two parts. First, and always inside the caller transaction, the insert into the dlv_message table (in 10.1.3.x that is into the inv_message), and secondly the transaction & new thread that executes the workitems, and creates a new instance.

This has several advantages in terms of scalability - because the engine's threadpool (invoker threads) will execute when a thread is available. However, the disadvantage is that there is no guarantee that it will execute immediately.

If one needs to have a sync-type call based on a one way operation - then they can use onewayDeliveryPolicy, which is a forward port of deliveryPersistPolicy in 10.1.3.

This property can be set by specifying bpel.config.oneWayDeliveryPolicy in a bpel component of composite.xml. Possible values are "async.persist", "async.cache" and "sync". If this value is not set in composite.xml, engine uses the oneWayDeliveryPolicy setting in bpel-config.xml

async.persist => persist in the db
async.cache => store in an in-memory hashmap
sync => direct invocation on the same thread

Below is the matrix based on the usecase described in my last post (here).

onewayDeliveryPolicy!=sync (default, callee runs in separate thread/treansation)

throw any fault
caller doesn't get response because message is saved in delivery service. The callee's transaction will rollback if the fault is not handled.

throw bpelx:rollback
caller doesn't get response because message is saved in delivery service. It will rollback on unhandled fault.

-------
onewayDeliveryPolicy=sync, txn=requriesNew (callee runs in the same thread, but different transaction)

throw any fault
caller gets FabricInvocationException. Callee transaction rolls back if the fault is not handled.

throw bpelx:rollback
caller gets FabricInvocationException. Callee transaction rolls back.

-------
onewayDeliveryPolicy=sync, txn=required (callee runs in the same thread and the same transaction)

throw any fault
Callee faulted. Caller gets FabricInvocationException. Caller has a chance to handle the fault.

throw bpelx:rollback
whole transaction rollback.

TrackBack

TrackBack URL for this entry:
http://blogs.oracle.com/mt/mt-tb.cgi/13555

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on August 24, 2009 8:10 AM.

The previous post in this blog was SOA Suite 11g - Transaction(s) & boundaries; Part One.

The next post in this blog is Oracle Open World 2009 - Meet the SOA team ...

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle