org.apache.cxf.transport.jms.util
Class JMSUtil
java.lang.Object
org.apache.cxf.transport.jms.util.JMSUtil
public final class JMSUtil
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
receive
public static javax.jms.Message receive(javax.jms.Session session,
javax.jms.Destination replyToDestination,
String correlationId,
long receiveTimeout,
boolean pubSubNoLocal)
convertJmsException
public static RuntimeException convertJmsException(javax.jms.JMSException e)
createCorrelationId
public static String createCorrelationId(String prefix,
long sequenceNUm)
createAndSetPayload
public static javax.jms.Message createAndSetPayload(Object payload,
javax.jms.Session session,
String messageType)
throws javax.jms.JMSException
- Create a JMS of the appropriate type populated with the given payload.
- Parameters:
payload
- the message payload, expected to be either of type String or byte[] depending on payload
typesession
- the JMS sessionreplyTo
- the ReplyTo destination if any
- Returns:
- a JMS of the appropriate type populated with the given payload
- Throws:
javax.jms.JMSException
createQueue
public static javax.jms.Queue createQueue(javax.jms.Connection connection,
String name)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
getNumMessages
public static int getNumMessages(javax.jms.Connection connection,
javax.jms.Queue queue)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
Apache CXF