Transaction identifiers are abstracted by the Xid interface (javax.transaction.xa.Xid) which conforms to the Open X/A specification.
See: Description
Class Summary | |
---|---|
BaseXid | Base implementation for all xids used by Tyrex (local, global, branch and external). |
BranchXid | Global transaction identifier with a branch qualifier. |
ExternalXid | External transaction identifier. |
GlobalXid | Global transaction identifier. |
InvalidXidException | An exception indicating the identifier is invalid and cannot be converted into an array of bytes. |
LocalXid | Local transaction identifier. |
XidUtils | Utility class for creating transaction identifiers, importing Xid objects, and converting a transaction identifier to/from a string representation. |
Transaction identifiers are abstracted by the Xid interface (javax.transaction.xa.Xid) which conforms to the Open X/A specification. A transaction identifier consists of a format identifier, a global transaction identifier, and a branch qualifier.
Transaction identifiers are often converted to and from a string representation. The string representation is used various places where an Xid object cannot be used. All transaction identifiers use the following format: xid:format-[<global>][-<branch>]. The prefix is always 'xid' and the format is always 32-bit long. The format identifier, global transaction identifier and branch qualifier are encoded as sequences of hexadeciaml digits.
In order to support a string representation, equality test and provide a hash code, all transaction identifiers must be derived from a common implementation. When an Xid object is obtained from a remote transaction server, it is imported into an internal implementation that fulfills these requirements.
XidUtils is a utility class for creating transaction identifiers, importing Xid objects, and converting a transaction identifier to/from a string representation.
LocalXid is an efficient implementation of a local transaction. A local transaction identifier has an empty global transaction identifier and unique branch qualifier.
GlobalXid is an efficient implementation of a global transaction. Branch transactions created from this transaction identifier are implemented by BranchXid.
ExternalXid is used for all distributed transactions and branches created externally.