Package org.apache.storm.jms.example
Class SpringJmsProvider
java.lang.Object
org.apache.storm.jms.example.SpringJmsProvider
- All Implemented Interfaces:
Serializable,JmsProvider
A
JmsProvider that uses the spring framework
to obtain a JMS ConnectionFactory and
Desitnation objects.
The constructor takes three arguments:
- A string pointing to the the spring application context file contining the JMS configuration (must be on the classpath)
- The name of the connection factory bean
- The name of the destination bean
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSpringJmsProvider(String appContextClasspathResource, String connectionFactoryBean, String destinationBean) Constructs aSpringJmsProviderobject 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 TypeMethodDescriptionjavax.jms.ConnectionFactoryProvides the JMSConnectionFactory.javax.jms.DestinationProvides theDestination(topic or queue) from which theJmsSpoutwill receive messages.
-
Constructor Details
-
SpringJmsProvider
public SpringJmsProvider(String appContextClasspathResource, String connectionFactoryBean, String destinationBean) Constructs aSpringJmsProviderobject 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 namedestinationBean- - the JMS destination bean name
-
-
Method Details
-
connectionFactory
Description copied from interface:JmsProviderProvides the JMSConnectionFactory.- Specified by:
connectionFactoryin interfaceJmsProvider- Returns:
- the connection factory
- Throws:
Exception
-
destination
Description copied from interface:JmsProviderProvides theDestination(topic or queue) from which theJmsSpoutwill receive messages.- Specified by:
destinationin interfaceJmsProvider- Throws:
Exception
-