com.sun.messaging

## Class ConnectionFactory

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

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

      public class ConnectionFactory
      extends BasicConnectionFactory
      implements javax.naming.Referenceable

  A `ConnectionFactory` is used to create Connections with the Sun MQ Java Message Service (JMS) provider.
  See Also:
    `javax.jms.ConnectionFactory`, `com.sun.messaging.ConnectionConfiguration`, 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
    Modifier | Constructor and Description
    --- | ---
    `` | `ConnectionFactory()` Constructs a ConnectionFactory with the default configuration.
    `protected` | `ConnectionFactory(java.lang.String defaultsBase)` Constructs a ConnectionFactory with the specified configuration.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.jms.QueueConnection` | `createQueueConnection()` Creates a Queue Connection with the default user identity.
    `javax.jms.QueueConnection` | `createQueueConnection(java.lang.String username, java.lang.String password)` Creates a Queue Connection with a specified user identity.
    `javax.jms.TopicConnection` | `createTopicConnection()` Creates a Topic Connection with the default user identity.
    `javax.jms.TopicConnection` | `createTopicConnection(java.lang.String username, java.lang.String password)` Creates a Topic Connection with a specified user identity.
    `javax.naming.Reference` | `getReference()` Returns the reference to this object.

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

      `createConnection, createConnection, createContext, createContext, createContext, createContext, getConnectionType, getContainerType, 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

    - #### ConnectionFactory

          public ConnectionFactory()

      Constructs a ConnectionFactory with the default configuration.

    - #### ConnectionFactory

          protected ConnectionFactory(java.lang.String defaultsBase)

      Constructs a ConnectionFactory with the specified configuration.

  - ### Method Detail

    - #### createQueueConnection

          public javax.jms.QueueConnection createQueueConnection()
                                                          throws javax.jms.JMSException

      Creates a Queue Connection with the default user identity. The default user identity is defined by the `ConnectionFactory` properties `imqDefaultUsername` and `imqDefaultPassword`
      Returns:
        a newly created Queue Connection.
      Throws:
        `javax.jms.JMSException` - if a JMS error occurs.
      See Also:
        `ConnectionConfiguration.imqDefaultUsername`, `ConnectionConfiguration.imqDefaultPassword`

    - #### createQueueConnection

          public javax.jms.QueueConnection createQueueConnection(java.lang.String username,
                                                                 java.lang.String password)
                                                          throws javax.jms.JMSException

      Creates a Queue Connection with a specified user identity.
      Parameters:
        `username` - the caller's user name
        `password` - the caller's password
      Returns:
        a newly created queue connection.
      Throws:
        `javax.jms.JMSException` - if a JMS error occurs.

    - #### createTopicConnection

          public javax.jms.TopicConnection createTopicConnection()
                                                          throws javax.jms.JMSException

      Creates a Topic Connection with the default user identity. The default user identity is defined by the `ConnectionFactory` properties `imqDefaultUsername` and `imqDefaultPassword`
      Returns:
        a newly created Topic Connection.
      Throws:
        `javax.jms.JMSException` - if a JMS error occurs.
      See Also:
        `ConnectionConfiguration.imqDefaultUsername`, `ConnectionConfiguration.imqDefaultPassword`

    - #### createTopicConnection

          public javax.jms.TopicConnection createTopicConnection(java.lang.String username,
                                                                 java.lang.String password)
                                                          throws javax.jms.JMSException

      Creates a Topic Connection with a specified user identity.
      Parameters:
        `username` - the caller's user name
        `password` - the caller's password
      Returns:
        a newly created topic connection.
      Throws:
        `javax.jms.JMSException` - if a JMS error occurs.

    - #### getReference

          public javax.naming.Reference getReference()

      Returns the reference to this object.
      Specified by:
        `getReference` in interface `javax.naming.Referenceable`
      Returns:
        The Reference Object that can be used to reconstruct this object

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