producer
<bean id="fooBatchProcessor" class="foo.jms.client.JmsFooBatchProcessor">
<property name="jmsTemplate" ref="jmsTemplate">
</property>
</bean>
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="connectionFactory">
</property>
<property name="defaultDestination" ref="barQueue">
</property>
</bean>
<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="vm://embedded?broker.persistent=false">
</property>
</bean>
<bean id="barQueue" class="org.apache.activemq.command.ActiveMQQueue">
<constructor-arg value="mq.queue.bar">
</constructor-arg>
</bean>
consumer/listener
<jms:listener-container>
<jms:listener ref="barProcessor" method="barProcess" destination="mq.queue.bar">
</jms:listener>
</jms:listener-container>
<bean id="fooBatchProcessor" class="foo.jms.client.JmsFooBatchProcessor">
<property name="jmsTemplate" ref="jmsTemplate">
</property>
</bean>
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="connectionFactory">
</property>
<property name="defaultDestination" ref="barQueue">
</property>
</bean>
<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="vm://embedded?broker.persistent=false">
</property>
</bean>
<bean id="barQueue" class="org.apache.activemq.command.ActiveMQQueue">
<constructor-arg value="mq.queue.bar">
</constructor-arg>
</bean>
consumer/listener
<jms:listener-container>
<jms:listener ref="barProcessor" method="barProcess" destination="mq.queue.bar">
</jms:listener>
</jms:listener-container>
Comments
Post a Comment