Oracle Transaction Manager for Microservices
Oracle Transaction Manager for Microservices
Oracle Transaction Manager for Microservices, also known as "MicroTx", simplifies application development and operations by enabling distributed transactions to ensure consistency across microservices deployed in Kubernetes.
Oracle Backend for Microservices and AI includes the free version of MicroTx, which has all of the functionality of the commercial version, but limits the number of transactions and only persists data in memory. It is recommended for evaluations and application development purposes.
MicroTx supports the following consistency models:
- Extended Architecture (XA)
- Long Running Actions (LRA)
- Try-Confirm/Cancel (TCC)
Use Oracle Transaction Manager for Microservices with Spring Boot
To use MicroTx in your Spring Boot applications, include the following dependency in your pom.xml or equivalent:
<dependency>
<groupId>com.oracle.microtx.lra</groupId>
<artifactId>microtx-lra-spring-boot-starter-3x</artifactId>
</dependency>
Add the following configuration to your Spring application configuration. The variables in this configuration are automatically injected into your deployment and pods when you deploy applications to Oracle Backend for Microservices and AI using the OBaaS deployment Helm chart.
spring:
microtx:
lra:
coordinator-url: ${MP_LRA_COORDINATOR_URL}
propagation-active: true
headers-propagation-prefix: "{x-b3-, oracle-tmm-, authorization, refresh-}"
lra:
coordinator:
url: ${MP_LRA_COORDINATOR_URL}
MicroTx Workflow Server
The MicroTx Workflow Server extends transaction coordinator with advanced workflow capabilities.
Before running the workflow server, ensure you have at least 2 CPU and 4 Gi memory free in your cluster. To enable the workflow server, set the otmm.workflowServer.enabled property to true in the Helm values:
otmm:
workflowServer:
enabled: true
Upgrading to the commercial version
If you have licensed Oracle Transaction Manager for Microservices Enterprise Edition, please see the documentation for details of how to install and configure MicroTx. Oracle recommends that you perform a new installation rather than attempting to upgrade the provided MicroTx Free installation to the commercial version.