You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2014/09/01 09:50:11 UTC
[2/3] git commit: CAMEL-7668: When stopping Camel,
then shutdown pojo @Consume eager.
CAMEL-7668: When stopping Camel, then shutdown pojo @Consume eager.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a524500a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a524500a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a524500a
Branch: refs/heads/camel-2.12.x
Commit: a524500a1260548c3213d08a9be085f9523717f0
Parents: ad8354c
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Sep 1 09:46:28 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Sep 1 09:49:31 2014 +0200
----------------------------------------------------------------------
.../main/java/org/apache/camel/impl/DefaultCamelContext.java | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/a524500a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index 0f2f3a9..2465b40 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -1781,6 +1781,14 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
// but clear any suspend routes
suspendedRouteServices.clear();
+ // stop consumers from the services to close first, such as POJO consumer (eg @Consumer)
+ // which we need to stop after the routes, as a POJO consumer is essentially a route also
+ for (Service service : servicesToClose) {
+ if (service instanceof Consumer) {
+ shutdownServices(service);
+ }
+ }
+
// the stop order is important
// shutdown default error handler thread pool