6.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.

The following annotations, which are part of the MicroTx client library, create a local transaction or a global XA transaction based on the context in which a participant service REST API is called.
  • 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.