Author: ningjiang
Date: Tue Jun 3 18:43:50 2008
New Revision: 662940
URL: http://svn.apache.org/viewvc?rev=662940&view=rev
Log:
CAMEL-574
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java?rev=662940&r1=662939&r2=662940&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
Tue Jun 3 18:43:50 2008
@@ -50,7 +50,7 @@
static class ProcessorExchangePair {
private final Processor processor;
private final Exchange exchange;
-
+
public ProcessorExchangePair(Processor processor, Exchange exchange) {
this.processor = processor;
this.exchange = exchange;
@@ -63,8 +63,8 @@
public Exchange getExchange() {
return exchange;
}
-
-
+
+
}
private Collection<Processor> processors;
@@ -90,7 +90,7 @@
if (executor != null) {
this.executor = executor;
} else { // setup default Executor
- this.executor = new ThreadPoolExecutor(1, processors.size(),
0, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(processors.size()));
+ this.executor = new ThreadPoolExecutor(processors.size(),
processors.size(), 0, TimeUnit.MILLISECONDS, new
ArrayBlockingQueue<Runnable>(processors.size()));
}
}
@@ -144,7 +144,7 @@
Exchange result = null;
List<ProcessorExchangePair> pairs =
createProcessorExchangePairs(exchange);
-
+
// Parallel Processing the producer
if (isParallelProcessing) {
Exchange[] exchanges = new Exchange[pairs.size()];
@@ -181,7 +181,7 @@
Processor producer = pair.getProcessor();
Exchange subExchange = pair.getExchange();
updateNewExchange(subExchange, i, pairs);
-
+
producer.process(subExchange);
if (aggregationStrategy != null) {
if (result == null) {