Class SpringJmsProvider

  • All Implemented Interfaces:
    Serializable, JmsProvider

    public class SpringJmsProvider
    extends Object
    implements JmsProvider
    A JmsProvider that uses the spring framework to obtain a JMS ConnectionFactory and Desitnation objects.

    The constructor takes three arguments:

    1. A string pointing to the the spring application context file contining the JMS configuration (must be on the classpath)
    2. The name of the connection factory bean
    3. The name of the destination bean

    See Also:
    Serialized Form
    • Constructor Detail

      • SpringJmsProvider

        public SpringJmsProvider​(String appContextClasspathResource,
                                 String connectionFactoryBean,
                                 String destinationBean)
        Constructs a SpringJmsProvider object given the name of a classpath resource (the spring application context file), and the bean names of a JMS connection factory and destination.
        Parameters:
        appContextClasspathResource - - the spring configuration file (classpath resource)
        connectionFactoryBean - - the JMS connection factory bean name
        destinationBean - - the JMS destination bean name
    • Method Detail

      • connectionFactory

        public javax.jms.ConnectionFactory connectionFactory()
                                                      throws Exception
        Description copied from interface: JmsProvider
        Provides the JMS ConnectionFactory.
        Specified by:
        connectionFactory in interface JmsProvider
        Returns:
        the connection factory
        Throws:
        Exception
      • destination

        public javax.jms.Destination destination()
                                          throws Exception
        Description copied from interface: JmsProvider
        Provides the Destination (topic or queue) from which the JmsSpout will receive messages.
        Specified by:
        destination in interface JmsProvider
        Throws:
        Exception