In a true distributed transaction, one needs a manager that manages the state of the transaction as it proceeds. With FioranoMQ, any transaction manager that implements the JTA specifications can be used.
- A JMS application uses a Transaction Manager to manage the resources taking part in the transaction.The steps listed below need to be followed to execute a transaction:
- Acquire the resource providers that take part in the XA transaction. The JMS application gets the resource objects and the XAResource object that takes part in the transaction. For FioranoMQ, it can get the resource object from the XASession object. (XAConnectionFactory->XAConnection->XASession->XAResource)
- Acquire a new transaction object from the Transaction Manager.
- Enlist the resources in the transaction object. The Transaction Manager internally starts the resources to mark the beginning of the distributed transaction.
- Perform zero or more operations with the various resources. The operations performed constitute the work done in the transaction.
- De-list the resources to mark the end of the transaction.
- Commits/Rollbacks the transaction.
Figure: FioranoMQ XA SPI with an external Transaction Manager
FioranoMQ XA support can be used with all available JTA compliant transaction managers. FioranoMQ XA has been successfully integrated with various Transaction Managers by Oracle, oc4j, Orion, and Borland (Visitrans Transaction Manager).
In case you are using a different transaction manager, please contact support@fiorano.com for step-by-step integration instructions.
The following sections explain how to use Orion Transaction Manager and Borland Transaction Manager to manage FioranoXA transactions.