7.3.4 Common Resource Manager for Multiple Apps
When you use a common resource manager for multiple participant services, MicroTx can optimize the commit processing resulting in higher throughput and lower latency for XA transactions.
When you use a common resource manager for multiple participant services, you can specify a value for the ORACLE_TMM_XA_RMID
environment variable to optimize the transaction. The transaction is optimized as only one branch is created for all the participant services that share a resource manager.
Let us consider that Dept A, Dept B, and Dept C are three participant services that share a resource manager, but have different ORACLE_TMM_XA_RMID
values. MicroTx creates a new branch for each department. In all MicroTx creates three branches to track the transactions.
To optimize the transaction, specify a unique value, such as ORCL1, for the ORACLE_TMM_XA_RMID
environment variable in the Dept A, Dept B, and Dept C services.
When you specify a value for the ORACLE_TMM_XA_RMID
environment variable, MicroTx creates a single branch for all the services that use a single resource manager. Since multiple branches are not created, the transaction is optimized. In this scenario, MicroTx optimizes the transaction and creates a single branch to track the transactions that involve the common resource manager and multiple participants. When you don't provide a value for this variable, MicroTx does not optimize the transaction and creates three branches, one for each participant service.
Note:
If you use the Oracle RAC database as a common resource manager for multiple participant services, you must specify the same RMID value for all the participant services that use a common Oracle RAC database as resource manager.
Limitations
- You can only share an XA-compliant resource manager with multiple participant services. You cannot share a non-XA resource with multiple participants services.
- You can use a common resource manager for all transaction participant services, including an initiator application which participates in the transaction. A transaction initiator service, which initiates the transaction but does not participate in the transaction, does not require a resource manager.
- You must use unique RMIDs for different resource managers. The transaction fails if you use same RMID for different resource managers.
Parent topic: Plan Your Resource Manager