Class ActiveMQXAConnection

  • All Implemented Interfaces:
    AutoCloseable, javax.jms.Connection, javax.jms.QueueConnection, javax.jms.TopicConnection, javax.jms.XAConnection, javax.jms.XAQueueConnection, javax.jms.XATopicConnection, Closeable, EnhancedConnection, StatsCapable, TransportListener

    public class ActiveMQXAConnection
    extends ActiveMQConnection
    implements javax.jms.XATopicConnection, javax.jms.XAQueueConnection, javax.jms.XAConnection
    The XAConnection interface extends the capability of Connection by providing an XASession (optional).

    The XAConnection interface is optional. JMS providers are not required to support this interface. This interface is for use by JMS providers to support transactional environments. Client programs are strongly encouraged to use the transactional support available in their environment, rather than use these XA interfaces directly.

    See Also:
    Connection, ConnectionFactory, QueueConnection, TopicConnection, TopicConnectionFactory, QueueConnection, QueueConnectionFactory
    • Method Detail

      • createXASession

        public javax.jms.XASession createXASession()
                                            throws javax.jms.JMSException
        Specified by:
        createXASession in interface javax.jms.XAConnection
        Throws:
        javax.jms.JMSException
      • createXATopicSession

        public javax.jms.XATopicSession createXATopicSession()
                                                      throws javax.jms.JMSException
        Specified by:
        createXATopicSession in interface javax.jms.XATopicConnection
        Throws:
        javax.jms.JMSException
      • createXAQueueSession

        public javax.jms.XAQueueSession createXAQueueSession()
                                                      throws javax.jms.JMSException
        Specified by:
        createXAQueueSession in interface javax.jms.XAQueueConnection
        Throws:
        javax.jms.JMSException
      • createSession

        public javax.jms.Session createSession​(boolean transacted,
                                               int acknowledgeMode)
                                        throws javax.jms.JMSException
        Description copied from class: ActiveMQConnection
        Creates a Session object.
        Specified by:
        createSession in interface javax.jms.Connection
        Specified by:
        createSession in interface javax.jms.XAConnection
        Overrides:
        createSession in class ActiveMQConnection
        Parameters:
        transacted - indicates whether the session is transacted
        acknowledgeMode - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, and Session.DUPS_OK_ACKNOWLEDGE.
        Returns:
        a newly created session
        Throws:
        javax.jms.JMSException - if the Connection object fails to create a session due to some internal error or lack of support for the specific transaction and acknowledgement mode.
        See Also:
        Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, Session.DUPS_OK_ACKNOWLEDGE
      • setXaAckMode

        public void setXaAckMode​(int xaAckMode)
      • getXaAckMode

        public int getXaAckMode()