Class WmJMSFactory
- java.lang.Object
-
- com.webmethods.jms.WmJMSFactory
-
public class WmJMSFactory extends java.lang.Object
This factory class provides access to connection factories and destinations without the need for JNDI.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WmConnectionFactory
getConnectionFactory()
Get a new instance of aWmConnectionFactory
.static WmQueue
getQueue()
Get a new instance of aWmQueue
.static WmQueue
getQueue(java.lang.String queueName)
Get a new instance of aWmQueue
.static WmQueueConnectionFactory
getQueueConnectionFactory()
Get a new instance of aWmQueueConnectionFactory
.static javax.jms.TemporaryQueue
getTemporaryQueue(java.lang.String queueName)
Get a new instance of aTemporaryQueue
.static javax.jms.TemporaryTopic
getTemporaryTopic(java.lang.String topicName)
Get a new instance of aTemporaryTopic
.static WmTopic
getTopic()
Get a new instance of aWmTopic
.static WmTopic
getTopic(java.lang.String topicName)
Get a new instance of aWmTopic
.static WmTopicConnectionFactory
getTopicConnectionFactory()
Get a new instance of aWmTopicConnectionFactory
.static WmConnectionFactory
getXAConnectionFactory()
Get a new instance of aWmConnectionFactory
that implements the XAConnectionFactory interface.static WmQueueConnectionFactory
getXAQueueConnectionFactory()
Get a new instance of aWmQueueConnectionFactory
that implements the XAQueueConnectionFactory interface.static WmTopicConnectionFactory
getXATopicConnectionFactory()
Get a new instance of aWmTopicConnectionFactory
that implements the XATopicConnectionFactory interface.
-
-
-
Method Detail
-
getConnectionFactory
public static WmConnectionFactory getConnectionFactory() throws javax.jms.JMSException
Get a new instance of aWmConnectionFactory
. The returned ConnectionFactory will by default connect to the default Broker on the local host.- Returns:
- a new instance of a ConnectionFactory implementation
- Throws:
javax.jms.JMSException
- if the ConnectionFactory could not be instantiated.
-
getQueueConnectionFactory
public static WmQueueConnectionFactory getQueueConnectionFactory() throws javax.jms.JMSException
Get a new instance of aWmQueueConnectionFactory
. The returned QueueConnectionFactory will by default connect to the default Broker on the local host.- Returns:
- a new instance of a QueueConnectionFactory implementation
- Throws:
javax.jms.JMSException
- if the QueueConnectionFactory could not be instantiated.
-
getTopicConnectionFactory
public static WmTopicConnectionFactory getTopicConnectionFactory() throws javax.jms.JMSException
Get a new instance of aWmTopicConnectionFactory
. The returned TopicConnectionFactory will by default connect to the default Broker on the local host.- Returns:
- a new instance of a TopicConnectionFactory implementation
- Throws:
javax.jms.JMSException
- if the TopicConnectionFactory could not be instantiated.
-
getXAConnectionFactory
public static WmConnectionFactory getXAConnectionFactory() throws javax.jms.JMSException
Get a new instance of aWmConnectionFactory
that implements the XAConnectionFactory interface. The returned XAConnectionFactory will by default connect to the default Broker on the local host.- Returns:
- a new instance of a XAConnectionFactory implementation
- Throws:
javax.jms.JMSException
- if the XAConnectionFactory could not be instantiated.
-
getXAQueueConnectionFactory
public static WmQueueConnectionFactory getXAQueueConnectionFactory() throws javax.jms.JMSException
Get a new instance of aWmQueueConnectionFactory
that implements the XAQueueConnectionFactory interface. The returned XAQueueConnectionFactory will by default connect to the default Broker on the local host.- Returns:
- a new instance of a XAQueueConnectionFactory implementation
- Throws:
javax.jms.JMSException
- if the XAQueueConnectionFactory could not be instantiated.
-
getXATopicConnectionFactory
public static WmTopicConnectionFactory getXATopicConnectionFactory() throws javax.jms.JMSException
Get a new instance of aWmTopicConnectionFactory
that implements the XATopicConnectionFactory interface. The returned XATopicConnectionFactory will by default connect to the default Broker on the local host.- Returns:
- a new instance of a XATopicConnectionFactory implementation
- Throws:
javax.jms.JMSException
- if the XATopicConnectionFactory could not be instantiated.
-
getQueue
public static WmQueue getQueue(java.lang.String queueName) throws javax.jms.JMSException
Get a new instance of aWmQueue
.- Parameters:
queueName
- the name of the queue- Returns:
- a new instance of a WmQueue
- Throws:
javax.jms.JMSException
- if the WmQueue could not be instantiated.
-
getQueue
public static WmQueue getQueue() throws javax.jms.JMSException
Get a new instance of aWmQueue
.A queue must have a name. Any attempt to use this queue before setting its name with
WmDestination.setName(java.lang.String)
will result in an error. It is recommended that thegetQueue(String)
method be used.- Returns:
- a new instance of a WmQueue
- Throws:
javax.jms.JMSException
- if the WmQueue could not be instantiated.
-
getTopic
public static WmTopic getTopic(java.lang.String topicName) throws javax.jms.JMSException
Get a new instance of aWmTopic
.- Parameters:
topicName
- the name of the topic- Returns:
- a new instance of a WmTopic
- Throws:
javax.jms.JMSException
- if the WmTopic could not be instantiated.
-
getTopic
public static WmTopic getTopic() throws javax.jms.JMSException
Get a new instance of aWmTopic
.A topic must have a name. Any attempt to use this topic before setting its name with
WmDestination.setName(java.lang.String)
will result in an error. It is recommended that thegetQueue(String)
method be used.- Returns:
- a new instance of a WmTopic
- Throws:
javax.jms.JMSException
- if the WmTopic could not be instantiated.
-
getTemporaryQueue
public static javax.jms.TemporaryQueue getTemporaryQueue(java.lang.String queueName) throws javax.jms.JMSException
Get a new instance of aTemporaryQueue
.This method is primarily useful for inbound marshaling methods. If a JMSReplyTo destination is a TemporaryQueue, this method can be used to instantiate an instance of that TemporaryQueue so the recipient can use the destination for replies.
- Returns:
- a new instance of an object that implements the TemporaryQueue interface
- Throws:
javax.jms.JMSException
- if the TemporaryQueue could not be instantiated.
-
getTemporaryTopic
public static javax.jms.TemporaryTopic getTemporaryTopic(java.lang.String topicName) throws javax.jms.JMSException
Get a new instance of aTemporaryTopic
.This method is primarily useful for inbound marshaling methods. If a JMSReplyTo destination is a TemporaryTopic, this method can be used to instantiate an instance of that TemporaryTopic so the recipient can use the destination for replies.
- Returns:
- a new instance of an object that implements the TemporaryTopic interface
- Throws:
javax.jms.JMSException
- if the TemporaryTopic could not be instantiated.
-
-