Author: davsclaus Date: Mon Feb 28 15:26:17 2011 New Revision: 1075374 URL: http://svn.apache.org/viewvc?rev=1075374&view=rev Log: CAMEL-3727: Fixed recipient list in parallel mode creating a new thread pool for aggregator background task.
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java?rev=1075374&r1=1075373&r2=1075374&view=diff ============================================================================== --- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java Mon Feb 28 15:26:17 2011 @@ -900,7 +900,7 @@ public class MulticastProcessor extends * @param name the suggested name for the background thread * @return the thread pool */ - protected ExecutorService createAggregateExecutorService(String name) { + protected synchronized ExecutorService createAggregateExecutorService(String name) { return camelContext.getExecutorServiceStrategy().newThreadPool(this, name, 1, Integer.MAX_VALUE); } Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java?rev=1075374&r1=1075373&r2=1075374&view=diff ============================================================================== --- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java Mon Feb 28 15:26:17 2011 @@ -111,7 +111,7 @@ public class RecipientList extends Servi RecipientListProcessor rlp = new RecipientListProcessor(exchange.getContext(), producerCache, iter, getAggregationStrategy(), isParallelProcessing(), getExecutorService(), isStreaming(), isStopOnException(), getTimeout()) { @Override - protected ExecutorService createAggregateExecutorService(String name) { + protected synchronized ExecutorService createAggregateExecutorService(String name) { // use a shared executor service to avoid creating new thread pools if (aggregateExecutorService == null) { aggregateExecutorService = super.createAggregateExecutorService("RecipientList-AggregateTask");