public class JMSUtils extends Object
| Constructor and Description |
|---|
JMSUtils() |
| Modifier and Type | Method and Description |
|---|---|
static javax.jms.Connection |
createConnection(javax.jms.ConnectionFactory conFac,
String user,
String pass,
boolean jmsSpec11,
Boolean isQueue,
boolean isDurable,
String clientID)
This is a JMS spec independent method to create a Connection.
|
static javax.jms.MessageProducer |
createProducer(javax.jms.Session session,
javax.jms.Destination destination,
Boolean isQueue,
boolean jmsSpec11)
This is a JMS spec independent method to create a MessageProducer.
|
static javax.jms.Session |
createSession(javax.jms.Connection connection,
boolean transacted,
int ackMode,
boolean jmsSpec11,
Boolean isQueue)
This is a JMS spec independent method to create a Session.
|
static <T> T |
lookup(Context context,
Class<T> clazz,
String name) |
static javax.jms.Destination |
lookupDestination(Context context,
String destinationName,
String destinationType)
Return the JMS destination with the given destination name looked up from the context.
|
public static <T> T lookup(Context context, Class<T> clazz, String name) throws NamingException
NamingExceptionpublic static javax.jms.Destination lookupDestination(Context context, String destinationName, String destinationType) throws NamingException
context - the Context to lookupdestinationName - name of the destination to be looked updestinationType - type of the destination to be looked upNamingExceptionpublic static javax.jms.Session createSession(javax.jms.Connection connection,
boolean transacted,
int ackMode,
boolean jmsSpec11,
Boolean isQueue)
throws javax.jms.JMSException
connection - the JMS Connectiontransacted - should the session be transacted?ackMode - the ACK mode for the sessionjmsSpec11 - should we use the JMS 1.1 API?isQueue - is this Session to deal with a Queue?javax.jms.JMSException - on errors, to be handled and logged by the callerpublic static javax.jms.Connection createConnection(javax.jms.ConnectionFactory conFac,
String user,
String pass,
boolean jmsSpec11,
Boolean isQueue,
boolean isDurable,
String clientID)
throws javax.jms.JMSException
conFac - the ConnectionFactory to useuser - optional user namepass - optional passwordjmsSpec11 - should we use JMS 1.1 API ?isQueue - is this to deal with a Queue?javax.jms.JMSException - on errors, to be handled and logged by the callerpublic static javax.jms.MessageProducer createProducer(javax.jms.Session session,
javax.jms.Destination destination,
Boolean isQueue,
boolean jmsSpec11)
throws javax.jms.JMSException
session - JMS sessiondestination - the DestinationisQueue - is the Destination a queue?jmsSpec11 - should we use JMS 1.1 API ?javax.jms.JMSException - on errors, to be handled and logged by the callerCopyright © 2019 WSO2. All rights reserved.