Non-Managed Transactions

Non-managed transactions provide transaction support for database operations performed in Spring and Java component implementations. A non-managed transaction must be explicitly started and committed by the component implementation. TIBCO ActiveMatrix guarantees that all database operations are atomically committed or rolled back.

The following figure illustrates the flow between the participants in a non-managed transaction.

Non-managed Transaction Flow


  1. In Step 2, the component implementation starts the transaction.
  2. Steps 3 and 4 participate in the transaction.
  3. In Step 5, the component implementation commits or rolls back the transaction before returning.
Steps 2 and 4 must be performed using the Java Transaction API. To explicitly manage transactions boundaries in a Java component you can retrieve a javax.transaction.UserTransaction instance from the component context:
import javax.transaction.UserTransaction;
...
UserTransaction tx = componentContext.getUserTransaction();
tx.begin();
...