camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/3] git commit: CAMEL-7668: When stopping Camel, then shutdown pojo @Consume eager.
Date Mon, 01 Sep 2014 07:50:10 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.12.x ad8354c4f -> a524500a1
  refs/heads/camel-2.13.x e3993f929 -> 7d1cf3d86
  refs/heads/master 9a92064cf -> 509f4ea5d


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/7d1cf3d8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7d1cf3d8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7d1cf3d8

Branch: refs/heads/camel-2.13.x
Commit: 7d1cf3d86f13787e40070077d2fcc6a907eab4ec
Parents: e3993f9
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Sep 1 09:46:28 2014 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Sep 1 09:49:23 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/7d1cf3d8/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 deec2e9..d84d20b 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
@@ -1891,6 +1891,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


Mime
View raw message