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 77E6718D26 for ; Wed, 1 Jul 2015 09:17:04 +0000 (UTC) Received: (qmail 48434 invoked by uid 500); 1 Jul 2015 09:17:04 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 48374 invoked by uid 500); 1 Jul 2015 09:17:04 -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 48365 invoked by uid 99); 1 Jul 2015 09:17:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jul 2015 09:17:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 40D93DFE7C; Wed, 1 Jul 2015 09:17:04 +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: Wed, 01 Jul 2015 09:17:04 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] camel git commit: CAMEL-8914: When using interceptSendToEndpoint then intercepted endpoints should be shutdown when Camel shutdown. Repository: camel Updated Branches: refs/heads/camel-2.15.x 97c6a8605 -> 5846204b2 refs/heads/master b811261b0 -> 46d5e4d8d CAMEL-8914: When using interceptSendToEndpoint then intercepted endpoints should be shutdown when Camel shutdown. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/46d5e4d8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/46d5e4d8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/46d5e4d8 Branch: refs/heads/master Commit: 46d5e4d8da2b5e64422404e9f56ae8aa975c438c Parents: b811261 Author: Claus Ibsen Authored: Wed Jul 1 11:22:44 2015 +0200 Committer: Claus Ibsen Committed: Wed Jul 1 11:22:44 2015 +0200 ---------------------------------------------------------------------- .../java/org/apache/camel/impl/InterceptSendToEndpoint.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/46d5e4d8/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java index 9c73ed2..b94b3eb 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java @@ -29,6 +29,7 @@ import org.apache.camel.ExchangePattern; import org.apache.camel.PollingConsumer; import org.apache.camel.Processor; import org.apache.camel.Producer; +import org.apache.camel.ShutdownableService; import org.apache.camel.util.ServiceHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,7 +41,7 @@ import static org.apache.camel.processor.PipelineHelper.continueProcessing; * * @version */ -public class InterceptSendToEndpoint implements Endpoint { +public class InterceptSendToEndpoint implements Endpoint, ShutdownableService { private static final Logger LOG = LoggerFactory.getLogger(InterceptSendToEndpoint.class); @@ -230,6 +231,11 @@ public class InterceptSendToEndpoint implements Endpoint { } @Override + public void shutdown() throws Exception { + ServiceHelper.stopAndShutdownServices(delegate, detour); + } + + @Override public String toString() { return delegate.toString(); }