Class SpringJmsProvider

java.lang.Object
org.apache.storm.jms.example.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:
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.jms.ConnectionFactory
    Provides the JMS ConnectionFactory.
    javax.jms.Destination
    Provides the Destination (topic or queue) from which the JmsSpout will receive messages.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 Details

    • 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