Details
Description
CAMEL-7667 included a fix for the DMLC used in JMS consumers to stop quickly if the CameContext is already shutting down. This helps avoid spring-jms getting into a bad state with a null sharedConnection which has a telling stack like:
2014-08-07 10:33:42,975 [sonnel.records]] ERROR ultJmsMessageListenerContainer - Could not refresh JMS Connection for destination 'personnel.records' - retrying in 5000 ms. Cause: null java.lang.NullPointerException at org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:392) at org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:885) at org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:861) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1012) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)
This can also occur in the DMLC used for request-reply messaging. We should provide an option for this to be enabled because usually this is not an issue and you don't mind waiting for a while for replies to come in.