You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Maurice <ma...@betzel.net> on 2014/07/07 16:12:53 UTC

JMS Request Reply DMLC shutdown

Dear Community,

camel seems to not shutdown the spring DMLC in a JMS Request Reply with
Camel Proxy scenario using:
Karaf 2.3.4
Spring 3.2.8
ActiveMQ 5.9.0
Setup like in tutorial http://camel.apache.org/tutorial-jmsremoting.html

Starting a bundle with temp queues is no problem and works like it should,
but on connection Failure or Bundle stop i get following ERROR in the Karaf
log:


This keeps on repeating. Camel uses a TemporaryQueueReplyManager for JMS
request reply, which on Stop does not get cleared in unInitReplyManager() of
JmsProducer. Replymanager is always null.

JMS bean setup:



How do i shutdown the leaking DMLC trying to connect a Temp queue that is
already deleted by ActiveMQ?





--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Request-Reply-DMLC-shutdown-tp5753465.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JMS Request Reply DMLC shutdown

Posted by Maurice <ma...@betzel.net>.
As a quick and dirty solution one can do this on bundle shutdown:

JmsEndpoint jmsEndpoint = camelContext.getEndpoint("amq:queue:Endpoint",
JmsEndpoint.class);
jmsEndpoint.onListenerContainerStopped(null);

This will decrement the runningMessageListeners (which should always be on
for temp queues because a singlethreadexecuter is used) to zero allowing
stop() to propagate to ServiceSupport.



--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Request-Reply-DMLC-shutdown-tp5753465p5753536.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JMS Request Reply DMLC shutdown

Posted by Maurice <ma...@betzel.net>.
There seems to be a cyclic bug in Camel regarding the shutdown of temporary
queues.
When stop() is called on the request reply JmsEndpoint the
runningMessageListeners.get() count returns 1 preventing to call stop on
ServiceSupport. Then inside the DMLC in refreshConnectionUntilSuccessful()
isRunning() gets called resulting in a JmsEndpoint isRunning() returning
true from ServiceSupport.
Is there a way to get out of this shutdown loop?



--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Request-Reply-DMLC-shutdown-tp5753465p5753529.html
Sent from the Camel - Users mailing list archive at Nabble.com.