Oracle Service Bus Transaction Management Best Practices

When developing proxy services in OSB, transaction management can be complex.
In OSB, there are several important points to remember like:

  1. In proxy services, check-box “Transaction Required” : This check-box ensures OSB execute the proxy service message flow in the context of a global transaction (JTA). If a global transaction already exists, the transport provider propagates it in the request. If no global transaction exists, a new global transaction will be started. An important point to remember that, if a new transaction gets started at proxy service, the transaction will be committed at this point and not send back to the caller.
  2. In the proxy service, check-box “Same Transaction for Response” : by checking this option, the request thread will be propagated to the response thread so the transaction will be committed or rolled back when the response pipeline ends.
  3. If the transaction has to be propogated to the published service, use exactly once QoS. Refer to the OSB documentation for this option. The default “best-effort” option executes the action in the local transaction context. Only, using QoS exactly once changes the error handler behaviour so refer to the OSB documentation for the details.
  4. It is a good design pattern to define the transaction timeouts for global transactions.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s