Friday, 3 May 2013

SOA Suite 11g - Transaction(s) & boundaries


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/transation)
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.

2 comments:

  1. oracle fusion Cloud HCM online training at erptree.com is worlds best online training center. we have excelent knowledge sharing Platform we have user friendly website where you will be provided with all the required details and Self-paced DEMO videos. we have our branches in pune, gurgaon, noida, india, usa, uk, uae, oracle fusion hcm training, fusion Procurement training, fusion hcm, scm training.

    ReplyDelete

xslt padding with characters call template for left pad and right pad

  Could a call-template be written that took two parameters ?   a string, and a   number) return the string with empty spaces appended t...