7.6.2.1 About MicroTx Client Library Annotations
Based on the context in which a participant service is called, the service participates in a local or global XA transaction.
- For JAX-RS applications:
@TrmSQLConnection
,@TrmEntityManager
, and@TrmNonXASQLConnection
annotations. - For Spring REST applications:
@microTxSqlConnection
,@microTxEntityManager
, and@microTxNonXASqlConnection
annotations.
When a participant service is called in the context of a global XA transaction, the MicroTx coordinator provides connections as part of the global XA transaction.
In a local transaction, a participant service does not interact with any other service or the MicroTx coordinator. The MicroTx coordinator does not callback a participant service which is not a part of a global transaction or when a participant service is called in the context of a local transaction. Application developers are responsible for handling commits and other operations for local transactions according to their business requirements.
Parent topic: About Global and Local Transactions