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

Hello world!

Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.

Here are some suggestions for your first post.

  1. You can find new ideas for what to blog about by reading the Daily Post.

  2. Add PressThis to your browser. It creates a new blog post for you about any interesting  page you read on the web.

  3. Make some changes to this page, and then hit preview on the right. You can alway preview any post or edit you before you share it to the world.

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 OSB proxy service gets any incorrect(404 HTTP Response) or there is an internal server error(500 HTTP response) from the transport the transaction will not roll back and message will lost. There seem to be some ambiguity among product designers on interpreting http spec and they decided to treat any response as a success.

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) In JMS proxy Route Error handler do a raise error and Reply with Failure.

5) Enable XA required property for proxy service which is listening to JMS queue


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