You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/12/18 07:10:22 UTC
svn commit: r727651 - in /activemq/camel/branches/camel-1.x: ./
camel-core/src/main/java/org/apache/camel/model/MulticastType.java
camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
Author: ningjiang
Date: Wed Dec 17 22:10:22 2008
New Revision: 727651
URL: http://svn.apache.org/viewvc?rev=727651&view=rev
Log:
Merged revisions 727624 via svnmerge from
https://svn.apache.org/repos/asf/activemq/camel/trunk
........
r727624 | ningjiang | 2008-12-18 11:17:00 +0800 (Thu, 18 Dec 2008) | 1 line
CAMEL-1193 Got interceptor to work with multicast type
........
Modified:
activemq/camel/branches/camel-1.x/ (props changed)
activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/MulticastType.java
activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 17 22:10:22 2008
@@ -1 +1 @@
-/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040,725309-725320,725340,725351,725569-725572,725612,725652-725660,725715,725883,726339,726640-726645,726932,727113,727375,727377
+/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040,725309-725320,725340,725351,725569-725572,725612,725652-725660,725715,725883,726339,726640-726645,726932,727113,727375,727377,727624
Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/MulticastType.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/MulticastType.java?rev=727651&r1=727650&r2=727651&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/MulticastType.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/MulticastType.java Wed Dec 17 22:10:22 2008
@@ -45,7 +45,7 @@
@XmlAttribute(required = false)
private String strategyRef;
@XmlAttribute(required = false)
- private String threadPoolRef;
+ private String threadPoolRef;
@XmlTransient
private AggregationStrategy aggregationStrategy;
@XmlTransient
@@ -103,8 +103,8 @@
public MulticastType executor(ThreadPoolExecutor executor) {
setThreadPoolExecutor(executor);
return this;
- }
-
+ }
+
protected Processor createCompositeProcessor(RouteContext routeContext, List<Processor> list) {
if (aggregationStrategy == null && strategyRef != null) {
aggregationStrategy = routeContext.lookup(strategyRef, AggregationStrategy.class);
@@ -142,10 +142,11 @@
this.threadPoolExecutor = executor;
}
-
+
@Override
- protected Processor wrapProcessorInInterceptors(RouteContext routeContext, Processor target) throws Exception {
- // No need to wrap me in interceptors as they are all applied directly to my children
- return new StreamCachingInterceptor(target);
+ protected Processor wrapProcessorInInterceptors(RouteContext routeContext, Processor target) throws Exception {
+ //CAMEL-1193 now we need to wrap the multicast processor with the interceptors
+ //Current we wrap the StreamCachingInterceptor by default
+ return super.wrapProcessorInInterceptors(routeContext, new StreamCachingInterceptor(target));
}
}
\ No newline at end of file
Modified: activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java?rev=727651&r1=727650&r2=727651&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java Wed Dec 17 22:10:22 2008
@@ -249,7 +249,9 @@
Endpoint key = route.getEndpoint();
assertEquals("From endpoint", "seda:a", key.getEndpointUri());
Processor processor = getProcessorWithoutErrorHandler(route);
-
+ // take off the InstrumentationProcessor
+ processor = unwrapDelegateProcessor(processor);
+ // take off the StreamCacheInterceptor
processor = unwrapInterceptor(processor);
MulticastProcessor multicastProcessor = assertIsInstanceOf(MulticastProcessor.class, processor);
List<Processor> endpoints = new ArrayList<Processor>(multicastProcessor.getProcessors());
@@ -499,6 +501,15 @@
return processor;
}
}
+
+ protected Processor unwrapDelegateProcessor(Processor processor) {
+ if (processor instanceof DelegateProcessor) {
+ DelegateProcessor delegate = (DelegateProcessor) processor;
+ return delegate.getProcessor();
+ } else {
+ return processor;
+ }
+ }
public void testCorrectNumberOfRoutes() throws Exception {
RouteBuilder builder = new RouteBuilder() {