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 BF3B1E59B for ; Tue, 5 Feb 2013 08:15:02 +0000 (UTC) Received: (qmail 90235 invoked by uid 500); 5 Feb 2013 08:15:02 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 90164 invoked by uid 500); 5 Feb 2013 08:15:02 -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 90140 invoked by uid 99); 5 Feb 2013 08:15:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2013 08:15:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2013 08:15:00 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 318352388847; Tue, 5 Feb 2013 08:14:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1442494 - in /camel/branches/camel-2.9.x: ./ camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java Date: Tue, 05 Feb 2013 08:14:40 -0000 To: commits@camel.apache.org From: davsclaus@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130205081440.318352388847@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: davsclaus Date: Tue Feb 5 08:14:39 2013 New Revision: 1442494 URL: http://svn.apache.org/viewvc?rev=1442494&view=rev Log: CAMEL-6035: Fixed issue with using global interceptor and interceptSendToEndpoint at the same time. Added: camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java - copied unchanged from r1442493, camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java Modified: camel/branches/camel-2.9.x/ (props changed) camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java Propchange: camel/branches/camel-2.9.x/ ------------------------------------------------------------------------------ Merged /camel/trunk:r1442491 Merged /camel/branches/camel-2.10.x:r1442493 Propchange: camel/branches/camel-2.9.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java?rev=1442494&r1=1442493&r2=1442494&view=diff ============================================================================== --- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java (original) +++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java Tue Feb 5 08:14:39 2013 @@ -34,6 +34,7 @@ import org.apache.camel.model.ModelChann import org.apache.camel.model.ProcessorDefinition; import org.apache.camel.processor.InterceptorToAsyncProcessorBridge; import org.apache.camel.processor.RouteContextProcessor; +import org.apache.camel.processor.WrapProcessor; import org.apache.camel.spi.InterceptStrategy; import org.apache.camel.spi.LifecycleStrategy; import org.apache.camel.spi.RouteContext; @@ -230,6 +231,10 @@ public class DefaultChannel extends Serv bridge.setTarget(wrapped); wrapped = bridge; } + // ensure target gets wrapped so we can control its lifecycle + if (!(wrapped instanceof WrapProcessor)) { + wrapped = new WrapProcessor(wrapped, target); + } target = wrapped; }