6 Develop Applications with XA

To use Transaction Manager for Microservices (MicroTx) to manage the transactions of your microservices, you need to make a few changes to your existing application code to integrate the functionality provided by the MicroTx libraries.

The MicroTx library is available for Java, Node.js, ORDS, Tuxedo, and WebLogic Server apps. See Supported Languages and Frameworks.
  1. Before you begin, ensure that you have installed the MicroTx transaction coordinator and you can access it. See Access MicroTx.
  2. Include the MicroTx client libraries in your microservice implementation.
  3. Use CDI annotations or MicroTx client libraries APIs to register the required interceptors and callbacks.
  4. Use CDI annotations or MicroTx client library APIs in participant microservices to obtain the connection to their XA compliant resource manager.
  5. Use MicroTx client libraries API to delineate transaction boundaries indicating an XA transaction has started, and then commit or roll back the transaction.

Use the following workflow as a guide to develop your applications to use MicroTx to manage XA transactions.

Task Description More Information
Set up resource manager for your transaction participant applications Identify the type of resource manager that you want to use, such as XA-compliant or non-XA compliant. Plan Your Resource Manager
Provide configuration information for the MicroTx library properties. Perform this step for all the transaction participant and transaction initiator applications so that your applications can access the library. Configure Library Properties
Integrate MicroTx library with your application code. Select a suitable procedure to integrate the library based on the following factors:
  • the development framework for your application
  • whether an application initiates the transaction or participates in the transaction
Based on your app, perform one of the following tasks:
Deploy your application Develop, test, and deploy your microservices independently. After using the library files in your application, the application in your environment. Deploy Your Application