Announcement Announcement Module
Collapse
No announcement yet.
DefaultMessageListenerContainer and broken connection to ActiveMQ Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Answer

    Answer to myself: using "failover" ActiveMQ transport protocol helped.

    Comment

    Working...
    X