7 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.
This section provides instructions to integrate MicroTx library with your application. Refer to the sample code of Bank Transfer application that uses the XA transaction protocol to transfer an amount from one department to another. The MicroTx library files are already integrated with the application code. Link to the relevant files is available in each section. Use these files as a reference when you integrate the MicroTx libraries with your application.
Topics
- About MicroTx Library for 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. - Workflow to Develop Applications with XA
Use the following workflow as a guide to develop your applications to use MicroTx to manage XA transactions. - Plan Your Resource Manager
Consider the points discussed in this section to plan the resource manager. Based on the resource manager that you select and how you use it, the configuration requirements varies for your application. - Provide the Resource Manager Connection Details
For every transaction participant application that uses a resource manager to store the application data, enter the connect string, user name, and password to access the resource manager in the application'sYAML
file. Skip this section if your application does not use a resource manager. - Configure PostgreSQL as Resource Manager
To use PostgreSQL as resource manager for XA transactions, you must enable prepared transactions and session affinity. - Manage XA Transactions
- Required User Privileges
You must have the following privileges to execute an XA transaction. - Configure Library Properties for JAX-RS and Node.js Apps
Provide configuration information for the MicroTx library properties for JAX-RS and Node.js applications. Specify the library property values for both participant and initiator applications. - About @Transactional
You can configure your Java applications that use the XA transaction protocol in two distinct ways. - Develop Spring Boot Apps with XA
Use the MicroTx library with your Spring Boot applications. - Develop JAX-RS Apps with XA
This section provides information about using the MicroTx library with Helidon applications that use the JAX-RS implementation. - Configure Java Apps to Leverage Transactional Event Queues
Integrate Oracle MicroTx library with your application to leverage the Oracle Transactional Event Queues (TEQ) feature. - Develop Node.js Apps with XA
- Develop ORDS App with XA
Configure an Oracle Database application, that you have built using Oracle APEX and Oracle REST Data Services (ORDS), as a transaction initiator or participant in an XA transaction with MicroTx. - Include Oracle Blockchain Platform in XA Transactions
You can use MicroTx to manage XA transactions in Oracle Blockchain Platform for Java applications, such as Spring Boot and Helidon.