GitHub user zregvart opened a pull request: https://github.com/apache/camel/pull/1534
CAMEL-11008: Consumer/Producer templates are not stopped when auto-configured in Spring Boot In [CAMEL-9431|https://issues.apache.org/jira/browse/CAMEL-9431] producer/consumer templates did not receive their own `destroyMethod` methods. I've changed those to use `stop` for `destroyMethod`, a proper solution might be that `DefaultCamelContext` tracks all templates and stops them on shutdown, or make them `CamelContextAware` and `addService` them to CamelContext, or `addService` them in `createProducerTemplate` `createConsumerTemplate`. I've decided to do a simple fix here and provide a unit test that can be used to validate the best solution to the problem. You can merge this pull request into a Git repository by running: $ git pull https://github.com/zregvart/camel CAMEL-11008 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/camel/pull/1534.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1534 ---- commit 2f265af02637864da93ec4c531cc5b95b5b41948 Author: Zoran Regvart <zregv...@apache.org> Date: 2017-03-13T22:42:12Z CAMEL-11008: Consumer/Producer templates are no... ...t stopped when auto-configured in Spring Boot In CAMEL-9431 producer/consumer templates did not receive their own `destroyMethod` methods. I've changed those to use `stop` for `destroyMethod`, a proper solution might be that `DefaultCamelContext` tracks all templates and stops them on shutdown, or make them `CamelContextAware` and `addService` them to CamelContext, or `addService` them in `createProducerTemplate` `createConsumerTemplate`. I've decided to do a simple fix here and provide a unit test that can be used to validate the best solution to the problem. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---