Saturday, February 11, 2012

Enabling Atomic Transaction for ADF bc based SDO


While invoking SDO from other applications like SOA , for transaction support wherein we need transaction to span across Bpel and SDO to maintain Transaction atomicity, there are few changes required at SDO end .

1.Update the SDO impl class:
Add following property :
@Transactional(
                 version = Transactional.Version.DEFAULT,
                 value = Transactional.TransactionFlowType.SUPPORTS)

This has to be done at Class level as well at the method level.

 These properties can be seen at EM as well.
EM->  Application Deployed -> Right click on Application Name -> Web Services -> coonfiguration
 - Atomic Transaction Version = default
 - Atomic Transaction Flow Option = support


These properties will  enable SDO to participate in Transactions.

Another way to support transaction for SDO is to use ADF bindings for invoking SDO service.
For this we need to do following things :
1. Add ADFApplicationLifecycleListener to the weblogic-application.xml
This will enable invoking the SDO via aprotocol such as RMI, which will allow the propagation of the transactional contextbetween the two components.
To enable the SDO to be invoked via RMI, we need to configure an appropriate
ADFApplication Lifecycle Listener to register the SDO as an RMI service


Select the Listeners tab, and click the green plus sign to add a new listener,set the Class to oracle.jbo.client.svc.ADFApplicationLifecycleListener , but don'tspecify any value for JAR Path and Run-As Principle


   <listener>
   <listener-class>oracle.jbo.client.svc.ADFApplicationLifecycleListener</listener-class>
   </listener>



2. While configuring ADF BC service bindings , provide the Registry name as = <ApplicationName>_JBOServiceRegistry


This works !!