Hi all,

we had a problem with the camel shutdown at a Talend ESB Camel example after updating to camel 2.10-SNAPSHOT.

The example uses a ProducerTemplate with a camel jms producer that is injected using an annotation:
@EndpointInject
ProducerTemplate producer;

At the end of the example main the spring context and with it the camel context is shut down. Before the update the update the main then exited normally. After the update it did not exit.

I found that the ProducerTemplate created a JMSProducer which with a DefaultMessageListenerContainer for the replies. This was still active and so the main did not exit.
When I issues a producer.close(); the main exited normally.

So the question is: Do I need to close a ProducerTemplate myself or should it be closed when the camel context that created it is shut down?

Christian

---
Here is the full example:
https://github.com/Talend/tesb-rt-se/tree/master/examples/camel/jaxrs-jms-http/client
and the change that made it work again:
https://github.com/Talend/tesb-rt-se/commit/7a9ae3502ca6f75ff6e38aba9dd94d86578cc028


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply via email to