This discussion is archived
2 Replies Latest reply: May 15, 2012 7:23 AM by 921672 RSS

OSB JMS Proxy XA Transaction Rollback not occuring to queue

921672 Newbie
Currently Being Moderated
Hi All

We are dequeuing a message from JMS queue via an XA connection factory and then calling a web service. If any error occurs in the web service we catch the error handler, log and notify it and want to send this message back to the queue for retrial (The retry settings are defined at the Queue Level from weblogic console).

Problem is rollback is not occurring, we have tried the below:

1) There is no OSB reply with either success or failure in the error handler (This should have done the trick)
2) We have also tried addiing an explicit Raise Error (Uncaught Error) to roll the message back, but its not working.


This rollback is not occurring because JMS Resource is XA and web service call is NON XA, hence the entire message flow becomes NON XA. Is this understanding correct?

How can we fix this? Please help
  • 1. Re: OSB JMS Proxy XA Transaction Rollback not occuring to queue
    687626 Expert
    Currently Being Moderated
    See this http://atheek.wordpress.com/2011/04/21/transaction-handling-within-osb
    Towards end there is a discussion on rollbacking for http errors. See if it helps.
  • 2. Re: OSB JMS Proxy XA Transaction Rollback not occuring to queue
    921672 Newbie
    Currently Being Moderated
    Hi atheek1

    Thanks for the reply, it worked. Before I mark this question as answered, pls. answer the below queries (Thanks a lot!)

    1) Well, i just ticked transaction required and same transaction for response and it started working. I did not add routing options like you mentioned to QOS Exactly Once. Its working without it fine. So, my questions is what is the use of adding this QOS to exactly once. Is it mandatory?

    2) I have a couple of OSB services in which rollback is working automatically (XA JMS to JCA FTP Adapter) and (XA JMS to JCA DB adapter XA data source), here rollback works automatically. I dont have to tick transaction required. So my question is, when an XA based connection factory picks a message from the queue, a transaction is started at the container level. So why tick transaction required at the message flow level, when the weblogic has already initiated a transaction. Since you said that HTTP transport commits a transaction even if 500 or 404 occurs, it makes sense to tick is transaction required and same transaction for response in OSB proxy service. But the remaining scenarios work without these options. Hence will it be wise to say that these settings are only required for HTTP transport coz of the way it behaves (commits 404 and 500).

    Thanks

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points