TRAX

Trax provides a simple transaction manager implementation to with JDBC transaction demarcation.

Transaction Manager Benefits

Features

Simplified API to use.
Can be used in stand-alone or in container based processes.
Supports multiple data sources.

Benefits

Trax provides a simple transaction manager implementation to with JDBC transaction demarcation.
The simple transactional wrapper on JDBC API.

Concepts

* The type of database does the matter, as long as jdbc driver support its.
* Provides a simple API to add transactional behavior to standalone or in container components.
* Support multiple transactions at the same time and with the same thread.
* Supports multiple data-sources but the transaction doesn't span across data sources.
* It does not support nested transactions.
* Within the same thread multiple transactions can begin and end, in other words, they can be overlapping.

Transaction Demarcation

It supports 4 types of transaction demarcation.

Transaction Demarcation

TRANSACTION_REQUIRED_NEW = 1 // create a new one irrespective, create a new one
TRANSACTION_REQUIRED = 2 // there should be one, it joins it
TRANSACTION_SUPPORTS = 3 // it exits it joins if exist and call a new one
TRANSACTION_NEVER = 4 // there should not be any trx, and create a new one