camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
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 GMT
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;
         }
 



Mime
View raw message