Class JmsPoolXAConnectionFactory

    • Constructor Detail

      • JmsPoolXAConnectionFactory

        public JmsPoolXAConnectionFactory()
    • Method Detail

      • getTransactionManager

        public javax.transaction.TransactionManager getTransactionManager()
      • setTransactionManager

        public void setTransactionManager​(javax.transaction.TransactionManager transactionManager)
      • setConnectionFactory

        public void setConnectionFactory​(Object toUse)
        Description copied from class: JmsPoolConnectionFactory
        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 JmsPoolConnectionFactory.clear() the pooled Connections.

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

        protected javax.jms.XAConnection createProviderConnection​(PooledConnectionKey key)
                                                           throws javax.jms.JMSException
        Description copied from class: JmsPoolConnectionFactory
        Given a PooledConnectionKey create a JMS Connection using the configuration from the key and the assigned JMS ConnectionFactory instance.
        Overrides:
        createProviderConnection in class JmsPoolConnectionFactory
        Parameters:
        key - The PooledSessionKey to use as configuration for the new JMS Connection.
        Returns:
        a new JMS Connection created using the configured JMS ConnectionFactory.
        Throws:
        javax.jms.JMSException - if an error occurs while creating the new JMS Connection.
      • createProviderContext

        protected javax.jms.XAJMSContext createProviderContext​(String username,
                                                               String password,
                                                               int sessionMode)
        Description copied from class: JmsPoolConnectionFactory
        Create a new JMSContext using the provided credentials and Session mode
        Overrides:
        createProviderContext in class JmsPoolConnectionFactory
        Parameters:
        username - The user name to use when creating the context.
        password - The password to use when creating the context.
        sessionMode - The session mode to use when creating the context.
        Returns:
        a new JMSContext created using the given configuration data..
      • createPooledConnection

        protected PooledXAConnection createPooledConnection​(javax.jms.Connection connection)
        Description copied from class: JmsPoolConnectionFactory
        Delegate that creates each instance of an ConnectionPool object. Subclasses can override this method to customize the type of connection pool returned.
        Overrides:
        createPooledConnection in class JmsPoolConnectionFactory
        Parameters:
        connection - The connection that is being added into the pool.
        Returns:
        instance of a new ConnectionPool.
      • 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 - controls if TXN manager resolution is from JNDI
      • createXAConnection

        public javax.jms.XAConnection createXAConnection()
                                                  throws javax.jms.JMSException
        Specified by:
        createXAConnection in interface javax.jms.XAConnectionFactory
        Throws:
        javax.jms.JMSException
      • createXAConnection

        public javax.jms.XAConnection createXAConnection​(String userName,
                                                         String password)
                                                  throws javax.jms.JMSException
        Specified by:
        createXAConnection in interface javax.jms.XAConnectionFactory
        Throws:
        javax.jms.JMSException
      • createXAContext

        public javax.jms.XAJMSContext createXAContext()
        Specified by:
        createXAContext in interface javax.jms.XAConnectionFactory
      • createXAContext

        public javax.jms.XAJMSContext createXAContext​(String userName,
                                                      String password)
        Specified by:
        createXAContext in interface javax.jms.XAConnectionFactory