When I start a simpleMessageListenerContainer while the ActiveMQ server is down, I get:
to perform GET on: http://localhost:22012 as response was: Connection to http://localhost:22012 refused
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:295)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:239)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:403)
at org.springframework.jms.listener.AbstractJmsListeningContainer.establishSharedConnection(AbstractJmsListeningContainer.java:371)
at org.springframework.jms.listener.SimpleMessageListenerContainer.doInitialize(SimpleMessageListenerContainer.java:187)
at org.springframework.jms.listener.AbstractJmsListeningContainer.initialize(AbstractJmsListeningContainer.java:193)
... 10 more
I can catch this exception, and the container will keep retrying, which is a good thing.
But here I get a NullPointerException from the destroy():
Caused by: java.lang.NullPointerException
at org.springframework.jms.listener.SimpleMessageListenerContainer.doShutdown(SimpleMessageListenerContainer.java:325)
at org.springframework.jms.listener.AbstractJmsListeningContainer.shutdown(AbstractJmsListeningContainer.java:231)
at org.springframework.jms.listener.AbstractJmsListeningContainer.destroy(AbstractJmsListeningContainer.java:172)
Apparently, this.consumers and this.sessions are null, while you try to iterate over them.
Affects: 3.0.7
The text was updated successfully, but these errors were encountered:
Geert Pante opened SPR-9930 and commented
When I start a simpleMessageListenerContainer while the ActiveMQ server is down, I get:
I can catch this exception, and the container will keep retrying, which is a good thing.
If I want to shut it down, I do
But here I get a NullPointerException from the destroy():
Apparently, this.consumers and this.sessions are null, while you try to iterate over them.
Affects: 3.0.7
The text was updated successfully, but these errors were encountered: