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.

Comments:

if the message is saved in delivery service and callee rollback on unhandled fault. Is here a way to configure callee to retry the rollback transaction with retry delays?

Posted by xiao huang on February 04, 2010 at 11:13 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Tips and tricks straight from the SOA / BPM development team at Oracle HQ

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today