Managed Global Transactions

A managed global transaction provides transaction support for database operations performed in one or more Spring, Java, Mediation, and BWSE component implementations. Database operations performed under managed global transaction in multiple components are atomically committed or rolled back. A managed global transaction conforms to the SCA managedTransaction.global intent.

A managed global transaction is started and terminated by the TIBCO ActiveMatrix platform. Managed global transactions are enabled by configuring a Managed Global Transaction intent and policy on each component that needs the transaction.

The TIBCO ActiveMatrix platform starts a new transaction for a component if:
  • A service of the component is invoked.
  • The component is configured with a Managed Global Transaction policy.
  • The component service is configured with a Transacted OneWay policy.
  • The thread used to invoke the component does not have a transaction already in progress.
The TIBCO ActiveMatrix platform propagates the transaction through the component references unless:
  • The component reference is configured with Transacted OneWay, AtLeastOnce, or Virtualize policy.
  • The target of the component reference is running on a different node.

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

Managed Global Transaction Flow


In this scenario, the transaction participants are:
  • The operations on Database 1 (3).
  • The operations on Database 2 (5).

If a managed global transaction is in progress and the conditions stated above are satisfied, then the transaction will propagate to the called component even if the called component is not enabled with a Managed Global Transaction intent.

Runtime Behavior

When there is no propagated transaction:

  • A new managed global transaction is started by TIBCO ActiveMatrix before the request message is delivered to service implementation.
  • For In-Out MEPs, the transaction is terminated by TIBCO ActiveMatrix on return from invocation of the service implementation. For In-Only MEPs, the transaction is terminated when the request processing completed by the service implementation.
    • The transaction is committed when the service returns without exceptions or throws a business exception (that is, a fault declared in the WSDL file).
    • The transaction is rolled back when the service throws an unchecked or non-declared exceptions.

When a propagated transaction is present:

  • The invoked component will participate in the propagated transaction and makes it a global transaction before the request message is delivered to component implementation.
  • The transaction is not terminated by theTIBCO ActiveMatrix platform on return from invocation of the component implementation. The transaction is always terminated by the TIBCO ActiveMatrix platform for the component that started the transaction.