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>
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 TypeMethodDescriptionorg.mule.runtime.api.config.PoolingProfileAllows 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
ConnectionProvideronly forXATransactionalConnections. Other connections will use the default connection management determined for thisConnectionProvider.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.
-