Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6113911473 for ; Mon, 1 Sep 2014 07:50:17 +0000 (UTC) Received: (qmail 87015 invoked by uid 500); 1 Sep 2014 07:50:10 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 86952 invoked by uid 500); 1 Sep 2014 07:50:10 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 86923 invoked by uid 99); 1 Sep 2014 07:50:10 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2014 07:50:10 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 67BD58C2DB0; Mon, 1 Sep 2014 07:50:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Mon, 01 Sep 2014 07:50:12 -0000 Message-Id: <5d266729addb4bb9ae555c44e0b6b69b@git.apache.org> In-Reply-To: <06a51db00b4e42db9e40fc6081a2787a@git.apache.org> References: <06a51db00b4e42db9e40fc6081a2787a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/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/509f4ea5 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/509f4ea5 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/509f4ea5 Branch: refs/heads/master Commit: 509f4ea5dbc5749dd4ea939179bbcd952a59e3c8 Parents: 9a92064 Author: Claus Ibsen Authored: Mon Sep 1 09:46:28 2014 +0200 Committer: Claus Ibsen Committed: Mon Sep 1 09:50:00 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/509f4ea5/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 2c36dc5..f825a25 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 @@ -1971,6 +1971,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