I hope now your doubt can be clear, but just in case, more information about this.
Typical XA resources are databases, messaging tools like JMS or WebSphere MQ, mainframe applications, ERP packages, or something else that can be negotiated with a transaction manager. XA is used to coordinate the so-called two-phase commit (2PC) transaction . A classic example of a 2PC transaction is that two different databases need to be updated atomically. Most people think of something like a bank that has one database for savings accounts and another for checking accounts. If a client wants to transfer money between his checking and savings accounts, both databases must be involved in the transaction, or the bank risks losing some of the money.
The problem is that most developers think: "Well, my application uses only one database, so I do not need to use XA in this database." This may not be true . The question to ask is “ Does the application require shared access to multiple resources that need to ensure the integrity of the transaction being performed? ” For example, does the Java 2 application use connector architecture adapters or Java Message Service (JMS)? If the application needs to update the database and any of these other resources in the same transaction, then both the database and the other resource need to be treated as XA resources.
source share