camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r943433 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java test/java/org/apache/camel/processor/aggregator/AggregatorTest.java
Date Wed, 12 May 2010 10:27:50 GMT
Author: davsclaus
Date: Wed May 12 10:27:50 2010
New Revision: 943433

URL: http://svn.apache.org/viewvc?rev=943433&view=rev
Log:
Improved stop logic a bit.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java?rev=943433&r1=943432&r2=943433&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
Wed May 12 10:27:50 2010
@@ -738,7 +738,6 @@ public class AggregateProcessor extends 
                 LOG.info("Using ClosedCorrelationKeys with unbounded capacity");
                 closedCorrelationKeys = new HashMap<Object, Object>();
             }
-
         }
 
         ServiceHelper.startServices(processor, aggregationRepository);
@@ -799,6 +798,8 @@ public class AggregateProcessor extends 
         ServiceHelper.stopServices(timeoutMap, processor, deadLetterProcessor);
 
         if (closedCorrelationKeys != null) {
+            // it may be a service so stop it as well
+            ServiceHelper.stopService(closedCorrelationKeys);
             closedCorrelationKeys.clear();
         }
         batchConsumerCorrelationKeys.clear();

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorTest.java?rev=943433&r1=943432&r2=943433&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorTest.java
Wed May 12 10:27:50 2010
@@ -92,6 +92,8 @@ public class AggregatorTest extends Cont
                     .aggregate(header("cheese"), new MyAggregationStrategy())
                         .eagerCheckCompletion()
                         .completionPredicate(header("bar").isEqualTo("viper bar"))
+                        // or complete with a timeout
+                        .completionTimeout(1000L)
                         .to("mock:result");
                 // END SNIPPET: ex
             }



Mime
View raw message