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?
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).