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
ConstructorDescriptionSpringJmsProvider
(String appContextClasspathResource, String connectionFactoryBean, String destinationBean) Constructs aSpringJmsProvider
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 TypeMethodDescriptionjavax.jms.ConnectionFactory
Provides the JMSConnectionFactory
.javax.jms.Destination
Provides theDestination
(topic or queue) from which theJmsSpout
will receive messages.
-
Constructor Details
-
SpringJmsProvider
public SpringJmsProvider(String appContextClasspathResource, String connectionFactoryBean, String destinationBean) Constructs aSpringJmsProvider
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 namedestinationBean
- - the JMS destination bean name
-
-
Method Details
-
connectionFactory
Description copied from interface:JmsProvider
Provides the JMSConnectionFactory
.- Specified by:
connectionFactory
in interfaceJmsProvider
- Returns:
- the connection factory
- Throws:
Exception
-
destination
Description copied from interface:JmsProvider
Provides theDestination
(topic or queue) from which theJmsSpout
will receive messages.- Specified by:
destination
in interfaceJmsProvider
- Throws:
Exception
-