-
Jul 8th, 2009, 09:27 AM
#1
DefaultMessageListenerContainer and broken connection to ActiveMQ
Hi,
I've written a simple standalone application to listen on a JMS queue. The problem is,
that when I start my application, it successfully connects to ActiveMQ broker (using
openwire protocol). But when I shutdown ActiveMQ (with CTRL+C) and start it again,
my application does not reconnect. On ActiveMQ queue I see that queue, that I want
to listen on, has 0 consumers.
Here is my applicationContext.xml:
---------------------------------------------------
<bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFacto ry">
<property name="brokerURL">
<value>cp://localhost:61616?jms.redeliveryPolicy.maximumRedeli veries=100</value>
</property>
</bean>
<bean id="jmsInputReceiver" class="test.JmsInputReceiver">
</bean>
<bean id="jmsListenerContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
<property name="connectionFactory" ref="jmsFactory"/>
<property name="destinationName" value="QueueName"/>
<property name="messageListener" ref="jmsInputReceiver" />
<property name="sessionTransacted" value="true" />
</bean>
---------------------------------------------------
I've only found http://jira.springframework.org/browse/SPR-2370, but it says
that this bug is already fixed.
I use Spring 2.5.6.SEC01.
What can be the reason?
regards,
Pawel
-
Jul 20th, 2009, 07:01 AM
#2
Answer
Answer to myself: using "failover" ActiveMQ transport protocol helped.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules