This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Transaction Mediator
The Transaction Mediator can provide transaction facility for a set of mediators defined as its child mediators. The Transaction Mediator with the action new
indicates the entry point for the transaction. A transaction is marked completed by the Transaction Mediator with the action commit
. The suspend and resume actions are used to pause a transaction at some point and start it again later. Additionally, the Transaction Mediator supports three other actions:
- use-existing-or-new
- fault-if-no-tx
- rollback
Syntax
<syn:transaction action="commit|fault-if-no-tx|new|resume|suspend|rollback|use-existing-or-new" />
UI Configuration
Action:
- Commit transaction (commit) -Â Ends the transaction.
- Fault if no transaction (fault-if-no-tx) -Â Goes to error handler if no transaction.
- Initiate new transaction (new) -Â Entries point for new transaction.
- Resume transaction (resume) -Â Resumes a paused transaction.
- Suspend transaction (suspend) -Â Pauses a transaction.
- Rollback transaction (rollback) -Â Rollbacks a transaction.
- Use existing or initiate transaction (use-existing-or new) -Â If a transaction already exists continue it or create a new transaction.
Note
You can configure the Mediator using XML. Click on "switch to source view" in the "Mediator" window.
Example