[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

XA Transactions: DB, Queue, and HTTP

I know that you can put queue get and put calls within an XA transaction (ActiveMQ).

I know you can put DB operations within an XA tx (Oracle)

Can you put HTTP request and HTTP response into an XA tx ?

Anthony Lucia
Anthony Lucia
1 Solution
mccarlIT Business Systems Analyst / Software DeveloperCommented:
Can you put HTTP request and HTTP response into an XA tx ?
Generally speaking, no!

I could imagine that it is remotely possible that a specialised Web Service could be made to be XA-aware and provide additional web service methods to allow for that. But in the general case, no, the web service request would not be part of the XA transaction.

This is not to say that there is NO interation between them, ie. if the web service request was to fail for some reason, then an exception would be thrown and the XA transaction would roll back, rolling back and JMS and/or DB calls. But the issue is if the web request were to succeed but then a subsequent JMS or DB call were to fail, then all the DB and JMS calls would roll back but the web service request would NOT roll back. Once the web service request completes successfully, that's it... there is no going back.

Featured Post

Cyber Threats to Small Businesses (Part 2)

The evolving cybersecurity landscape presents SMBs with a host of new threats to their clients, their data, and their bottom line. In part 2 of this blog series, learn three quick processes Webroot’s CISO, Gary Hayslip, recommends to help small businesses beat modern threats.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now