Class JMSUtils


  • public class JMSUtils
    extends Object
    Maintain the common methods used by inbound JMS protocol
    • Constructor Detail

      • JMSUtils

        public JMSUtils()
    • Method Detail

      • inferJMSMessageType

        public static String inferJMSMessageType​(javax.jms.Message msg)
        Method to infer the JMS message type.
        Parameters:
        msg - the message to be inferred
        Returns:
        the type of the JMS message
      • convertXMLtoJMSMap

        public static void convertXMLtoJMSMap​(org.apache.axiom.om.OMElement element,
                                              javax.jms.MapMessage message)
                                       throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • setTransportHeaders

        public static void setTransportHeaders​(org.apache.axis2.context.MessageContext msgContext,
                                               javax.jms.Message message)
                                        throws javax.jms.JMSException
        Set transport headers from the axis message context, into the JMS message
        Parameters:
        msgContext - the axis message context
        message - the JMS Message
        Throws:
        javax.jms.JMSException - on exception
      • lookupDestination

        public static javax.jms.Destination lookupDestination​(Context context,
                                                              String destinationName,
                                                              String destinationType)
                                                       throws NamingException
        Return the JMS destination with the given destination name looked up from the context
        Parameters:
        context - the Context to lookup
        destinationName - name of the destination to be looked up
        destinationType - type of the destination to be looked up
        Returns:
        the JMS destination, or null if it does not exist
        Throws:
        NamingException
      • getTransportHeaders

        public static Map<String,​Object> getTransportHeaders​(javax.jms.Message message,
                                                                   org.apache.axis2.context.MessageContext msgContext)
        Extract transport level headers from JMS message into a Map
        Parameters:
        message - JMS message
        msgContext - axis2 message context
        Returns:
        a Map of the transport headers