Interface XATransactionalConnectionProvider<C extends TransactionalConnection>

Type Parameters:
C - the generic type of the connections that may support XA to be handled
All Superinterfaces:
ConnectionProvider<C>

@MinMuleVersion("4.10") public interface XATransactionalConnectionProvider<C extends TransactionalConnection> extends ConnectionProvider<C>
Specialization of ConnectionProvider for connections that may participate in a XA Transaction.

The TransactionManager within the Mule Runtime will handle the XAResource for the provided connections (ref: XATransactionalConnection.getXAResource()).

This interface will mark a ConnectionProvider as its connections may participate in a XA transaction. It will be up to the implementation/user config to actually participate in an XA transaction, a local transaction or no transaction at all.

Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    org.mule.runtime.api.config.PoolingProfile
    Allows to configure the connection pool to be used exclusively for XA.

    Methods inherited from interface org.mule.sdk.api.connectivity.ConnectionProvider

    connect, disconnect, validate
  • Method Details

    • getXaPoolingProfile

      org.mule.runtime.api.config.PoolingProfile getXaPoolingProfile()
      Allows to configure the connection pool to be used exclusively for XA. This is useful for when a connection pool is not required for local transactions or non-transactional cases.

      XA support may require connections to be pooled so that:

      • If more than one session cannot be used within the same connection, getting a new connection is not an expensive operation.
      • Transaction management tasks that may need a connection (i.e.: transaction recovery) have a connection ready for use.

      This configuration will be added to the connection management for this ConnectionProvider only for XATransactionalConnections. Other connections will use the default connection management determined for this ConnectionProvider.

      If this connectionProvider already implements PoolingConnectionProvider, the pooling connection configured in the application will be used instead of calling this method.

      Returns:
      the pooling configuration to use for XA connections provided by this ConnectionProvider.