Thursday, July 14, 2011

OSB Internal Server Error - JMS Transaction rollback

This blog explain how to roll back a transaction in case of internal server errors in OSB. In general, if it gets any http response from the transport. There seem to be some ambiguity among product designers on interpreting http spec and they decided to treat any response as a success. This case transaction will not roll back and message will lost.

Scenario

JMS Queue -> OSB Proxy Service -> OSB  Business Service ->  Failing Service

To resolve the issues, please flow below steps in OSB proxy service.

1)      In Route node of routing options make  Quality of Service as ‘"Exactly Once”



2)      Enabled the Same Transaction for Response in the Proxy service which was listening to the JMS queue  –



3)      The Connection Factory used  to consume message from JMS queue should be  XA enable (XA connection factory).

4)      enabled XA required property for proxy service which is listening to JMS queue

5)      in JMS proxy Route Error handler do a raise error and Reply with Failure.



Once you make these necessary changes in proxy services. Activate changes and retest the flow. now you can observer the transaction will roll back in case of  ‘Internal server Error”  J

No comments:

Post a Comment