Class ActiveMQ

  • All Implemented Interfaces:
    JMSDriver
    Direct Known Subclasses:
    ActiveMQ

    public class ActiveMQ
    extends java.lang.Object
    implements JMSDriver
    The ActiveMQ JMS Driver implementation. It initialize the JMS Driver and provides specific way for obtaining JMS QueueConnectionFactory/TopicConnectionFactory.
    • Constructor Summary

      Constructors 
      Constructor Description
      ActiveMQ()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.jms.QueueConnectionFactory getQueueFactory()
      This method retrieves the provider-specific javax.jms.QueueConnectionFactory object
      javax.jms.TopicConnectionFactory getTopicFactory()
      This method retrieves the provider-specific javax.jms.TopicConnectionFactory object
      void initialize​(java.util.Hashtable env)
      The initialize(Hastable env) method is passed a java.util.Hashtable object which stores provider-specific parameters, which can be used for connecting to a specific instance of the JMS server.
      void terminate()
      This is a call-back method used to notify the JMS Driver so it could clean any used resources.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PROP_BROKER_URL

        public static final java.lang.String PROP_BROKER_URL
        JMS Driver property name used to define broker.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ActiveMQ

        public ActiveMQ()
    • Method Detail

      • initialize

        public void initialize​(java.util.Hashtable env)
                        throws java.lang.Exception
        The initialize(Hastable env) method is passed a java.util.Hashtable object which stores provider-specific parameters, which can be used for connecting to a specific instance of the JMS server. Normally this method would use the supplied parameters to connect to the JMS server and obtain a javax.jms.TopicConnectionFactory object and/or a javax.jms.QueueConnectionFactory object. Then the method would store the object(s) in member variables so that it/they can be later retrieved via the getQueueFactory() and/or the getTopicFactory() method.
        Specified by:
        initialize in interface JMSDriver
        Parameters:
        env - Hashtable that holds Driver properties
        Throws:
        java.lang.Exception - if JMS Driver cannot be initialized
      • getQueueFactory

        public javax.jms.QueueConnectionFactory getQueueFactory()
                                                         throws java.lang.Exception
        This method retrieves the provider-specific javax.jms.QueueConnectionFactory object
        Specified by:
        getQueueFactory in interface JMSDriver
        Returns:
        QueueConnectionFactory object of the JMS Driver
        Throws:
        java.lang.Exception - if QueueConnectionFactory cannot be created
      • getTopicFactory

        public javax.jms.TopicConnectionFactory getTopicFactory()
                                                         throws java.lang.Exception
        This method retrieves the provider-specific javax.jms.TopicConnectionFactory object
        Specified by:
        getTopicFactory in interface JMSDriver
        Returns:
        TopicConnectionFactory object of the JMS Driver
        Throws:
        java.lang.Exception - if TopicConnectionFactory cannot be created
      • terminate

        public void terminate()
                       throws java.lang.Exception
        This is a call-back method used to notify the JMS Driver so it could clean any used resources. This method should be used in very rare cases.
        Specified by:
        terminate in interface JMSDriver
        Throws:
        java.lang.Exception - if error while terminating occurs.