Class JMSVendorAdapter

  • Direct Known Subclasses:
    BeanVendorAdapter, JNDIVendorAdapter

    public abstract class JMSVendorAdapter
    extends java.lang.Object
    SPI Interface that all JMSVendorAdaptors must implement. Allows for ConnectionFactory creation and Destination lookup
    Author:
    Jaime Meritt (jmeritt@sonicsoftware.com), Ray Chun (rchun@sonicsoftware.com)
    • Constructor Detail

      • JMSVendorAdapter

        public JMSVendorAdapter()
    • Method Detail

      • getQueueConnectionFactory

        public abstract QueueConnectionFactory getQueueConnectionFactory​(java.util.HashMap cfProps)
                                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getTopicConnectionFactory

        public abstract TopicConnectionFactory getTopicConnectionFactory​(java.util.HashMap cfProps)
                                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addVendorConnectionFactoryProperties

        public abstract void addVendorConnectionFactoryProperties​(JMSURLHelper jmsurl,
                                                                  java.util.HashMap cfProps)
      • isMatchingConnectionFactory

        public abstract boolean isMatchingConnectionFactory​(javax.jms.ConnectionFactory cf,
                                                            JMSURLHelper jmsurl,
                                                            java.util.HashMap cfProps)
      • getVendorId

        public java.lang.String getVendorId()
      • getJMSConnectorProperties

        public java.util.HashMap getJMSConnectorProperties​(JMSURLHelper jmsurl)
        Creates a JMS connector property table using values supplied in the endpoint address. Properties are translated from the short form in the endpoint address to the long form (prefixed by "transport.jms.")
        Parameters:
        jmsurl - the endpoint address
        Returns:
        the set of properties to be used for instantiating the JMS connector
      • getJMSConnectionFactoryProperties

        public java.util.HashMap getJMSConnectionFactoryProperties​(JMSURLHelper jmsurl)
        Creates a connection factory property table using values supplied in the endpoint address
        Parameters:
        jmsurl - the endpoint address
        Returns:
        the set of properties to be used for instantiating the connection factory
      • getQueue

        public Queue getQueue​(QueueSession session,
                              java.lang.String name)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getTopic

        public Topic getTopic​(TopicSession session,
                              java.lang.String name)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isRecoverable

        public boolean isRecoverable​(java.lang.Throwable thrown,
                                     int action)
      • setProperties

        public void setProperties​(Message message,
                                  java.util.HashMap props)
                           throws JMSException
        Throws:
        JMSException
      • setupMessageContext

        public void setupMessageContext​(MessageContext context,
                                        Call call,
                                        JMSURLHelper jmsurl)
        Set JMS properties in the message context. TODO: just copy all properties that are not used for the JMS connector or connection factory