Thursday, October 18, 2012

SOA BPEL Issue


Issue:

In Clustered SOA environment, An external client synchronously invokes a BPEL process which in turn invokes another asynchronous BPEL process.

Some time synchronous response is returned to the client and sometime No response is sent to the client, in which the client eventually times out. Although the async process is getting succeeded in it's operation.


Root Cause: This is happening because of internal BPEL OC4J load balancing feature. when a sync process comes to Node A (as an OHS thread), and calls the Asyn process, callback returns to load balancer but routed to Node B BPEL. and Sync process on Node A BPEL (orginal OHS thread) keep on waiting and time outs.

Solution:
 This is a limitation in SOA 10g but there is a workaround by doing the callback to the actual node where ohs thread is still waiting.

There are few steps:


- declare variable

variable name="replyTo" messageType="ns1:WSAReplyToHeader"/

where ns1 is the namespace for Async partnerlink. It should not matter which one, as the type is the same.

- assigned values to the variable. Make sure the Address contains partnerlink and role of the requester

- use the variable when doing the invoke

invoke name="Invoke_NoFeeProvider"
partnerLink="WizzitAccountInfoAsyncABCSNoFeeProvider"
portType="ns4:WizzitAccountInfoAsyncABCSNoFeeProvider"
operation="initiate"
inputVariable="Invoke_NoFeeProvider_initiate_InputVariable"
bpelx:inputHeaderVariable="replyTo"

- modify bpel.xml to contain

property name="optSoapShortcut"
false
property

for the partnerlink of async process.


- modify mod_oc4j.conf to enable local affinity when apache calls oc4j.


Oc4jSet StatusUri /oc4j-status
Oc4jSelectMethod roundrobin:local

No comments:

Post a Comment