Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.util.connection
Class ServerConnectionFactory  view ServerConnectionFactory download ServerConnectionFactory.java

java.lang.Object
  extended byorg.activemq.util.connection.ServerConnectionFactory

public class ServerConnectionFactory
extends java.lang.Object

Provides static methods for creating Session and Destination objects.


Field Summary
static java.lang.String JBOSSMQ_SERVER
           
static java.lang.String JNP_INTERFACES
           
static java.lang.String JORAM_CONNECTION_FACTORY
           
static java.lang.String JORAM_NAMING_CONTEXT
           
static java.lang.String JORAM_NAMING_PORT
           
static java.lang.String JORAM_PASSWORD
           
static java.lang.String JORAM_QUEUE
           
static java.lang.String JORAM_SERVER
           
static java.lang.String JORAM_TOPIC
           
static java.lang.String JORAM_USERNAME
           
static java.lang.String MANTARAY_SERVER
           
private static int mantarayConsumerPortCount
           
private static int mantarayProducerPortCount
           
static java.lang.String NAMING_CONTEXT
           
static java.lang.String NAMING_HOST
           
static java.lang.String NAMING_PORT
           
static java.lang.String OPENJMS_NAMING_CONTEXT
           
static java.lang.String OPENJMS_QUEUE
           
static java.lang.String OPENJMS_SERVER
           
static java.lang.String OPENJMS_TOPIC
           
static java.lang.String SONICMQ_QUEUE
           
static java.lang.String SONICMQ_SERVER
           
static java.lang.String SONICMQ_TOPIC
           
static java.lang.String TIBCOMQ_QUEUE
           
static java.lang.String TIBCOMQ_SERVER
           
static java.lang.String TIBCOMQ_TOPIC
           
static javax.jms.Topic topicContext
           
 
Constructor Summary
ServerConnectionFactory()
           
 
Method Summary
static void close(javax.jms.Connection connection, javax.jms.Session session)
          Closes the connection passed through the parameter
static javax.jms.Connection createConnectionFactory(java.lang.String url, java.lang.String connFactoryClass)
          Dynamically creates a ConnectionFactory object depending on the MQ Factory class.
static javax.jms.Connection createConnectionFactory(java.lang.String url, java.lang.String mqServer, boolean isTopic, boolean embeddedBroker)
          Dynamically creates a Connection object based on the type of broker.
static javax.jms.Destination createDestination(javax.jms.Session session, java.lang.String subject, java.lang.String url, java.lang.String mqServer, boolean isTopic)
          Creates a Destination object through Session using subject.
static javax.jms.Session createSession(javax.jms.Connection connection, boolean isTransacted, java.lang.String mqServer, boolean isTopic)
          Creates a Session object.
private static java.lang.String getHost(java.lang.String url)
          Returns the host part of the URL.
static javax.naming.InitialContext getInitialContext(java.lang.String url, java.lang.String mqServer)
          Creates an InitialContext object which contains the information of the broker.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SONICMQ_SERVER

public static final java.lang.String SONICMQ_SERVER

TIBCOMQ_SERVER

public static final java.lang.String TIBCOMQ_SERVER

JBOSSMQ_SERVER

public static final java.lang.String JBOSSMQ_SERVER

OPENJMS_SERVER

public static final java.lang.String OPENJMS_SERVER

JORAM_SERVER

public static final java.lang.String JORAM_SERVER

JORAM_CONNECTION_FACTORY

public static final java.lang.String JORAM_CONNECTION_FACTORY

JORAM_USERNAME

public static final java.lang.String JORAM_USERNAME

JORAM_PASSWORD

public static final java.lang.String JORAM_PASSWORD

JORAM_NAMING_PORT

public static final java.lang.String JORAM_NAMING_PORT

MANTARAY_SERVER

public static final java.lang.String MANTARAY_SERVER

SONICMQ_TOPIC

public static final java.lang.String SONICMQ_TOPIC
See Also:
Constant Field Values

SONICMQ_QUEUE

public static final java.lang.String SONICMQ_QUEUE
See Also:
Constant Field Values

TIBCOMQ_TOPIC

public static final java.lang.String TIBCOMQ_TOPIC
See Also:
Constant Field Values

TIBCOMQ_QUEUE

public static final java.lang.String TIBCOMQ_QUEUE
See Also:
Constant Field Values

NAMING_CONTEXT

public static final java.lang.String NAMING_CONTEXT
See Also:
Constant Field Values

JNP_INTERFACES

public static final java.lang.String JNP_INTERFACES
See Also:
Constant Field Values

OPENJMS_NAMING_CONTEXT

public static final java.lang.String OPENJMS_NAMING_CONTEXT
See Also:
Constant Field Values

OPENJMS_TOPIC

public static final java.lang.String OPENJMS_TOPIC
See Also:
Constant Field Values

OPENJMS_QUEUE

public static final java.lang.String OPENJMS_QUEUE
See Also:
Constant Field Values

JORAM_NAMING_CONTEXT

public static final java.lang.String JORAM_NAMING_CONTEXT
See Also:
Constant Field Values

JORAM_TOPIC

public static final java.lang.String JORAM_TOPIC
See Also:
Constant Field Values

JORAM_QUEUE

public static final java.lang.String JORAM_QUEUE
See Also:
Constant Field Values

NAMING_HOST

public static final java.lang.String NAMING_HOST
See Also:
Constant Field Values

NAMING_PORT

public static final java.lang.String NAMING_PORT
See Also:
Constant Field Values

topicContext

public static javax.jms.Topic topicContext

mantarayProducerPortCount

private static int mantarayProducerPortCount

mantarayConsumerPortCount

private static int mantarayConsumerPortCount
Constructor Detail

ServerConnectionFactory

public ServerConnectionFactory()
Method Detail

close

public static void close(javax.jms.Connection connection,
                         javax.jms.Session session)
                  throws javax.jms.JMSException
Closes the connection passed through the parameter


createConnectionFactory

public static javax.jms.Connection createConnectionFactory(java.lang.String url,
                                                           java.lang.String mqServer,
                                                           boolean isTopic,
                                                           boolean embeddedBroker)
                                                    throws javax.jms.JMSException
Dynamically creates a Connection object based on the type of broker.


createDestination

public static javax.jms.Destination createDestination(javax.jms.Session session,
                                                      java.lang.String subject,
                                                      java.lang.String url,
                                                      java.lang.String mqServer,
                                                      boolean isTopic)
                                               throws javax.jms.JMSException
Creates a Destination object through Session using subject.


createSession

public static javax.jms.Session createSession(javax.jms.Connection connection,
                                              boolean isTransacted,
                                              java.lang.String mqServer,
                                              boolean isTopic)
                                       throws javax.jms.JMSException
Creates a Session object.


createConnectionFactory

public static javax.jms.Connection createConnectionFactory(java.lang.String url,
                                                           java.lang.String connFactoryClass)
                                                    throws javax.jms.JMSException
Dynamically creates a ConnectionFactory object depending on the MQ Factory class.


getInitialContext

public static javax.naming.InitialContext getInitialContext(java.lang.String url,
                                                            java.lang.String mqServer)
                                                     throws javax.jms.JMSException
Creates an InitialContext object which contains the information of the broker. This is used if the broker uses JNDI.


getHost

private static java.lang.String getHost(java.lang.String url)
Returns the host part of the URL.