XAResource
XAResource is an interface defined by the X/Open XA standard that enables a resource manager to participate in a distributed transaction coordinated by a transaction manager. In Java, it is exposed as javax.transaction.xa.XAResource (and jakarta.transaction.xa.XAResource in newer specifications). Resource managers such as relational databases, message queues, or other data stores implement XAResource to participate in a global transaction across multiple resources.
Core purpose and usage: XAResource provides the contract through which a resource manager coordinates with a
Key methods: The interface includes start(Xid, int flags) to associate a global transaction with the resource,
Xid and exceptions: XAResource operations use Xid, a global transaction identifier, to distinguish different transactions and