Class XAConnectionFactory

  • All Implemented Interfaces:
    jakarta.jms.ConnectionFactory, jakarta.jms.XAConnectionFactory, java.io.Serializable, javax.naming.Referenceable
    Direct Known Subclasses:
    XAQueueConnectionFactory, XATopicConnectionFactory

    public class XAConnectionFactory
    extends ConnectionFactory
    implements jakarta.jms.XAConnectionFactory
    An XAConnectionFactory is used to create XAConnections with the Sun MQ Java Message Service (JMS) provider.
    See Also:
    jakarta.jms.XAConnectionFactory, Serialized Form
    • Constructor Detail

      • XAConnectionFactory

        public XAConnectionFactory()
    • Method Detail

      • createXAConnection

        public jakarta.jms.XAConnection createXAConnection()
                                                    throws jakarta.jms.JMSException
        Create an XA connection with default user identity. The connection is created in stopped mode. No messages will be delivered until Connection.start method is explicitly called.
        Specified by:
        createXAConnection in interface jakarta.jms.XAConnectionFactory
        Returns:
        a newly created XA connection.
        Throws:
        jakarta.jms.JMSException - if JMS Provider fails to create XA Connection due to some internal error.
        jakarta.jms.JMSSecurityException - if client authentication fails due to invalid user name or password.
      • createXAConnection

        public jakarta.jms.XAConnection createXAConnection​(java.lang.String username,
                                                           java.lang.String password)
                                                    throws jakarta.jms.JMSException
        Create an XA connection with specified user identity. The connection is created in stopped mode. No messages will be delivered until Connection.start method is explicitly called.
        Specified by:
        createXAConnection in interface jakarta.jms.XAConnectionFactory
        Parameters:
        username - the caller's user name
        password - the caller's password
        Returns:
        a newly created XA connection.
        Throws:
        jakarta.jms.JMSException - if JMS Provider fails to create XA connection due to some internal error.
        jakarta.jms.JMSSecurityException - if client authentication fails due to invalid user name or password.
      • createXAQueueConnection

        public jakarta.jms.XAQueueConnection createXAQueueConnection()
                                                              throws jakarta.jms.JMSException
        Create an XA queue connection with default user identity. The connection is created in stopped mode. No messages will be delivered until Connection.start method is explicitly called.
        Returns:
        a newly created XA queue connection.
        Throws:
        jakarta.jms.JMSException - if JMS Provider fails to create XA queue Connection due to some internal error.
        jakarta.jms.JMSSecurityException - if client authentication fails due to invalid user name or password.
      • createXAQueueConnection

        public jakarta.jms.XAQueueConnection createXAQueueConnection​(java.lang.String username,
                                                                     java.lang.String password)
                                                              throws jakarta.jms.JMSException
        Create an XA queue connection with specific user identity. The connection is created in stopped mode. No messages will be delivered until Connection.start method is explicitly called.
        Parameters:
        username - the caller's user name
        password - the caller's password
        Returns:
        a newly created XA queue connection.
        Throws:
        jakarta.jms.JMSException - if JMS Provider fails to create XA queue Connection due to some internal error.
        jakarta.jms.JMSSecurityException - if client authentication fails due to invalid user name or password.
      • createXATopicConnection

        public jakarta.jms.XATopicConnection createXATopicConnection()
                                                              throws jakarta.jms.JMSException
        Create an XA topic connection with default user identity. The connection is created in stopped mode. No messages will be delivered until Connection.start method is explicitly called.
        Returns:
        a newly created XA topic connection.
        Throws:
        jakarta.jms.JMSException - if JMS Provider fails to create XA topic Connection due to some internal error.
        jakarta.jms.JMSSecurityException - if client authentication fails due to invalid user name or password.
      • createXATopicConnection

        public jakarta.jms.XATopicConnection createXATopicConnection​(java.lang.String username,
                                                                     java.lang.String password)
                                                              throws jakarta.jms.JMSException
        Create an XA topic connection with specified user identity. The connection is created in stopped mode. No messages will be delivered until Connection.start method is explicitly called.
        Parameters:
        username - the caller's user name
        password - the caller's password
        Returns:
        a newly created XA topic connection.
        Throws:
        jakarta.jms.JMSException - if JMS Provider fails to create XA topi connection due to some internal error.
        jakarta.jms.JMSSecurityException - if client authentication fails due to invalid user name or password.
      • createXAContext

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

        public jakarta.jms.XAJMSContext createXAContext​(java.lang.String userName,
                                                        java.lang.String password)
        Specified by:
        createXAContext in interface jakarta.jms.XAConnectionFactory
      • getContainerType

        protected static com.sun.messaging.jmq.jmsclient.ContainerType getContainerType()