XAConnectionFactory (Message Queue, 5.1 API Specification)
Date: 2019-01-27

com.sun.messaging

## Class XAConnectionFactory

- java.lang.Object
- - com.sun.messaging.AdministeredObject
  - - com.sun.messaging.BasicConnectionFactory
    - - com.sun.messaging.ConnectionFactory
      - - com.sun.messaging.XAConnectionFactory

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

      public class XAConnectionFactory
      extends ConnectionFactory
      implements javax.jms.XAConnectionFactory

  An `XAConnectionFactory` is used to create XAConnections with the Sun MQ Java Message Service (JMS) provider.
  See Also:
    `javax.jms.XAConnectionFactory`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.sun.messaging.AdministeredObject

      `AO_PROPERTY_TYPE_BOOLEAN, AO_PROPERTY_TYPE_INTEGER, AO_PROPERTY_TYPE_LIST, AO_PROPERTY_TYPE_LONG, AO_PROPERTY_TYPE_PROPERTYOWNER, AO_PROPERTY_TYPE_STRING, cachedConfigurationMap, configuration, configurationLabels, configurationTypes, cr, storedVersion, VERSION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XAConnectionFactory()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.jms.XAConnection` | `createXAConnection()` Create an XA connection with default user identity.
    `javax.jms.XAConnection` | `createXAConnection(java.lang.String username, java.lang.String password)` Create an XA connection with specified user identity.
    `javax.jms.XAJMSContext` | `createXAContext()`
    `javax.jms.XAJMSContext` | `createXAContext(java.lang.String userName, java.lang.String password)`
    `javax.jms.XAQueueConnection` | `createXAQueueConnection()` Create an XA queue connection with default user identity.
    `javax.jms.XAQueueConnection` | `createXAQueueConnection(java.lang.String username, java.lang.String password)` Create an XA queue connection with specific user identity.
    `javax.jms.XATopicConnection` | `createXATopicConnection()` Create an XA topic connection with default user identity.
    `javax.jms.XATopicConnection` | `createXATopicConnection(java.lang.String username, java.lang.String password)` Create an XA topic connection with specified user identity.
    `protected static com.sun.messaging.jmq.jmsclient.ContainerType` | `getContainerType()`

    - ### Methods inherited from class com.sun.messaging.ConnectionFactory

      `createQueueConnection, createQueueConnection, createTopicConnection, createTopicConnection, getReference`

    - ### Methods inherited from class com.sun.messaging.BasicConnectionFactory

      `createConnection, createConnection, createContext, createContext, createContext, createContext, getConnectionType, setConnectionType, setDefaultConfiguration, toString`

    - ### Methods inherited from class com.sun.messaging.AdministeredObject

      `dump, enumeratePropertyNames, getConfiguration, getCurrentConfiguration, getLabelForGroup, getPropertiesForGroup, getProperty, getPropertyForListValue, getPropertyGroups, getPropertyLabel, getPropertyListOtherName, getPropertyListValues, getPropertyType, getPropertyValueForListValue, getStoredVersion, getVERSION, isPropertyDeprecated, isPropertyHidden, isReadOnly, isStoredVersionCompatible, setProperty, setReadOnly`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### XAConnectionFactory

          public XAConnectionFactory()

  - ### Method Detail

    - #### createXAConnection

          public javax.jms.XAConnection createXAConnection()
                                                    throws javax.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 `javax.jms.XAConnectionFactory`
      Returns:
        a newly created XA connection.
      Throws:
        `javax.jms.JMSException` - if JMS Provider fails to create XA Connection due to some internal error.
        `javax.jms.JMSSecurityException` - if client authentication fails due to invalid user name or password.

    - #### createXAConnection

          public javax.jms.XAConnection createXAConnection(java.lang.String username,
                                                           java.lang.String password)
                                                    throws javax.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 `javax.jms.XAConnectionFactory`
      Parameters:
        `username` - the caller's user name
        `password` - the caller's password
      Returns:
        a newly created XA connection.
      Throws:
        `javax.jms.JMSException` - if JMS Provider fails to create XA connection due to some internal error.
        `javax.jms.JMSSecurityException` - if client authentication fails due to invalid user name or password.

    - #### createXAQueueConnection

          public javax.jms.XAQueueConnection createXAQueueConnection()
                                                              throws javax.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:
        `javax.jms.JMSException` - if JMS Provider fails to create XA queue Connection due to some internal error.
        `javax.jms.JMSSecurityException` - if client authentication fails due to invalid user name or password.

    - #### createXAQueueConnection

          public javax.jms.XAQueueConnection createXAQueueConnection(java.lang.String username,
                                                                     java.lang.String password)
                                                              throws javax.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:
        `javax.jms.JMSException` - if JMS Provider fails to create XA queue Connection due to some internal error.
        `javax.jms.JMSSecurityException` - if client authentication fails due to invalid user name or password.

    - #### createXATopicConnection

          public javax.jms.XATopicConnection createXATopicConnection()
                                                              throws javax.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:
        `javax.jms.JMSException` - if JMS Provider fails to create XA topic Connection due to some internal error.
        `javax.jms.JMSSecurityException` - if client authentication fails due to invalid user name or password.

    - #### createXATopicConnection

          public javax.jms.XATopicConnection createXATopicConnection(java.lang.String username,
                                                                     java.lang.String password)
                                                              throws javax.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:
        `javax.jms.JMSException` - if JMS Provider fails to create XA topi connection due to some internal error.
        `javax.jms.JMSSecurityException` - if client authentication fails due to invalid user name or password.

    - #### createXAContext

          public javax.jms.XAJMSContext createXAContext()

      Specified by:
        `createXAContext` in interface `javax.jms.XAConnectionFactory`

    - #### createXAContext

          public javax.jms.XAJMSContext createXAContext(java.lang.String userName,
                                                        java.lang.String password)

      Specified by:
        `createXAContext` in interface `javax.jms.XAConnectionFactory`

    - #### getContainerType

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

Copyright (c) 2010, 2017 Oracle and/or its affiliates. All rights reserved.