JBoss API: Class ConnectionFactoryHelper

org.jboss.jms
Class ConnectionFactoryHelper

java.lang.Object
  |
  +--org.jboss.jms.ConnectionFactoryHelper

public class ConnectionFactoryHelper
extends java.lang.Object

A helper for creating connections from jms connection factories.

Version:
$Revision: 1.4.2.1 $
Author:
Jason Dillon

Constructor Summary
ConnectionFactoryHelper()
           
 
Method Summary
static javax.jms.QueueConnection createQueueConnection(java.lang.Object factory)
          Create a queue connection from the given factory.
static javax.jms.QueueConnection createQueueConnection(java.lang.Object factory, java.lang.String username, java.lang.String password)
          Create a queue connection from the given factory.
static javax.jms.TopicConnection createTopicConnection(java.lang.Object factory)
          Create a topic connection from the given factory.
static javax.jms.TopicConnection createTopicConnection(java.lang.Object factory, java.lang.String username, java.lang.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

createQueueConnection

public static javax.jms.QueueConnection createQueueConnection(java.lang.Object factory,
                                                              java.lang.String username,
                                                              java.lang.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.
java.lang.IllegalArgumentException - Factory is null or invalid.

createQueueConnection

public static javax.jms.QueueConnection createQueueConnection(java.lang.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.
java.lang.IllegalArgumentException - Factory is null or invalid.

createTopicConnection

public static javax.jms.TopicConnection createTopicConnection(java.lang.Object factory,
                                                              java.lang.String username,
                                                              java.lang.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.
java.lang.IllegalArgumentException - Factory is null or invalid.

createTopicConnection

public static javax.jms.TopicConnection createTopicConnection(java.lang.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.
java.lang.IllegalArgumentException - Factory is null or invalid.


Copyright © 2000 The JBoss Organization. All Rights Reserved.