Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.jms
Class ConnectionFactoryHelper

    java.lang.Object
      org.jboss.jms.ConnectionFactoryHelper

public class ConnectionFactoryHelper
extends Object

A helper for creating connections from jms connection factories.

Version:
  $Revision: 1.7 $
Author:
  Jason Dillon

Constructor Summary
`ConnectionFactoryHelper()`

Method Summary
`static javax.jms.Connection` | `createConnection(Object factory)` Create a connection from the given factory.
`static javax.jms.Connection` | `createConnection(Object factory, String username, String password)` Create a connection from the given factory.
`static javax.jms.QueueConnection` | `createQueueConnection(Object factory)` Create a queue connection from the given factory.
`static javax.jms.QueueConnection` | `createQueueConnection(Object factory, String username, String password)` Create a queue connection from the given factory.
`static javax.jms.TopicConnection` | `createTopicConnection(Object factory)` Create a topic connection from the given factory.
`static javax.jms.TopicConnection` | `createTopicConnection(Object factory, String username, String password)` Create a topic connection from the given factory.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConnectionFactoryHelper

    public ConnectionFactoryHelper()

Method Detail

### createConnection

    public static javax.jms.Connection createConnection(Object factory,
                                                        String username,
                                                        String password)
                                                 throws javax.jms.JMSException

  Create a connection from the given factory. An XA connection will be created if possible.

  Parameters:
    `factory` - An object that implements ConnectionFactory, XAQConnectionFactory
    `username` - The username to use or null for no user.
    `password` - The password for the given username or null if no username was specified.
  Returns:
    A queue connection.
  Throws:
    `javax.jms.JMSException` - Failed to create connection.
    `IllegalArgumentException` - Factory is null or invalid.

### createConnection

    public static javax.jms.Connection createConnection(Object factory)
                                                 throws javax.jms.JMSException

  Create a connection from the given factory. An XA connection will be created if possible.

  Parameters:
    `factory` - An object that implements QueueConnectionFactory, XAQueueConnectionFactory
  Returns:
    A queue connection.
  Throws:
    `javax.jms.JMSException` - Failed to create connection.
    `IllegalArgumentException` - Factory is null or invalid.

### createQueueConnection

    public static javax.jms.QueueConnection createQueueConnection(Object factory,
                                                                  String username,
                                                                  String password)
                                                           throws javax.jms.JMSException

  Create a queue connection from the given factory. An XA connection will be created if possible.

  Parameters:
    `factory` - An object that implements QueueConnectionFactory, XAQueueConnectionFactory
    `username` - The username to use or null for no user.
    `password` - The password for the given username or null if no username was specified.
  Returns:
    A queue connection.
  Throws:
    `javax.jms.JMSException` - Failed to create connection.
    `IllegalArgumentException` - Factory is null or invalid.

### createQueueConnection

    public static javax.jms.QueueConnection createQueueConnection(Object factory)
                                                           throws javax.jms.JMSException

  Create a queue connection from the given factory. An XA connection will be created if possible.

  Parameters:
    `factory` - An object that implements QueueConnectionFactory, XAQueueConnectionFactory
  Returns:
    A queue connection.
  Throws:
    `javax.jms.JMSException` - Failed to create connection.
    `IllegalArgumentException` - Factory is null or invalid.

### createTopicConnection

    public static javax.jms.TopicConnection createTopicConnection(Object factory,
                                                                  String username,
                                                                  String password)
                                                           throws javax.jms.JMSException

  Create a topic connection from the given factory. An XA connection will be created if possible.

  Parameters:
    `factory` - An object that implements TopicConnectionFactory, XATopicConnectionFactory
    `username` - The username to use or null for no user.
    `password` - The password for the given username or null if no username was specified.
  Returns:
    A topic connection.
  Throws:
    `javax.jms.JMSException` - Failed to create connection.
    `IllegalArgumentException` - Factory is null or invalid.

### createTopicConnection

    public static javax.jms.TopicConnection createTopicConnection(Object factory)
                                                           throws javax.jms.JMSException

  Create a topic connection from the given factory. An XA connection will be created if possible.

  Parameters:
    `factory` - An object that implements TopicConnectionFactory, XATopicConnectionFactory
  Returns:
    A topic connection.
  Throws:
    `javax.jms.JMSException` - Failed to create connection.
    `IllegalArgumentException` - Factory is null or invalid.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.