Class XACachedJmsTransactionManager

  • All Implemented Interfaces:
    AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, LicensedComponent, TransactionManager, java.io.Serializable

    @ComponentProfile(summary="Transaction manager that caches XAResources, so only enlists and delists once per transaction.",
                      tag="transactions,jms")
    public class XACachedJmsTransactionManager
    extends XAJmsTransactionManager

    Transaction manager that attaches any created transactions to the current thread.

    Further, this transaction manager will ignore calls to enlist/delist resources that have already been enlisted for the current transaction. This attempts to increase performance by skipping enlisting and delisting when you using message batching (multiple messages per transaction).

    You can further configure the transaction manager by adding a transactions.properties file to your classpath.

    For this TransactionManager implementation you must set the following property in your transactions.properties file;

     com.atomikos.icatch.automatic_resource_registration=true 

    A typical transactions.properties file will look like the following;

     com.atomikos.icatch.automatic_resource_registration=true
     com.atomikos.icatch.max_timeout=3600000
     com.atomikos.icatch.default_jta_timeout=3600000
     

    The two timeout values above must be set to a value greater than the time it takes your consumer to begin a transaction, process messages and finally commit/rollback the transaction.

    See Also:
    Serialized Form

    In the adapter configuration file this class is aliased as xa-cached-jms-transaction-manager which is the preferred alternative to the fully qualified classname when building your configuration.