Class XaPooledConnectionFactory

java.lang.Object
org.apache.activemq.jms.pool.PooledConnectionFactory
org.apache.activemq.jms.pool.XaPooledConnectionFactory
All Implemented Interfaces:
jakarta.jms.ConnectionFactory, jakarta.jms.QueueConnectionFactory, jakarta.jms.TopicConnectionFactory, Serializable, ObjectFactory
Direct Known Subclasses:
JcaPooledConnectionFactory

public class XaPooledConnectionFactory extends PooledConnectionFactory implements ObjectFactory, Serializable
A pooled connection factory that automatically enlists sessions in the current active XA transaction if any.
See Also:
  • Constructor Details

    • XaPooledConnectionFactory

      public XaPooledConnectionFactory()
  • Method Details

    • getTransactionManager

      public jakarta.transaction.TransactionManager getTransactionManager()
    • setTransactionManager

      public void setTransactionManager(jakarta.transaction.TransactionManager transactionManager)
    • setConnectionFactory

      public void setConnectionFactory(Object toUse)
      Description copied from class: PooledConnectionFactory
      Sets the ConnectionFactory used to create new pooled Connections.

      Updates to this value do not affect Connections that were previously created and placed into the pool. In order to allocate new Connections based off this new ConnectionFactory it is first necessary to PooledConnectionFactory.clear() the pooled Connections.

      Overrides:
      setConnectionFactory in class PooledConnectionFactory
      Parameters:
      toUse - The factory to use to create pooled Connections.
    • createConnection

      protected jakarta.jms.Connection createConnection(ConnectionKey key) throws jakarta.jms.JMSException
      Overrides:
      createConnection in class PooledConnectionFactory
      Throws:
      jakarta.jms.JMSException
    • createConnectionPool

      protected ConnectionPool createConnectionPool(jakarta.jms.Connection connection)
      Description copied from class: PooledConnectionFactory
      Delegate that creates each instance of an ConnectionPool object. Subclasses can override this method to customize the type of connection pool returned.
      Overrides:
      createConnectionPool in class PooledConnectionFactory
      Returns:
      instance of a new ConnectionPool.
    • getObjectInstance

      public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception
      Specified by:
      getObjectInstance in interface ObjectFactory
      Throws:
      Exception
    • getTmJndiName

      public String getTmJndiName()
    • setTmJndiName

      public void setTmJndiName(String tmJndiName)
    • isTmFromJndi

      public Boolean isTmFromJndi()
    • setTmFromJndi

      public void setTmFromJndi(Boolean tmFromJndi)
      Allow transaction manager resolution from JNDI (ee deployment)
      Parameters:
      tmFromJndi -