camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r932274 - /camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
Date Fri, 09 Apr 2010 07:36:21 GMT
Author: davsclaus
Date: Fri Apr  9 07:36:21 2010
New Revision: 932274

URL: http://svn.apache.org/viewvc?rev=932274&view=rev
Log:
Aggregate should also use lock when recover, just to be more safe, despite the task it does
shouldn't really need to be run exclusive

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.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=932274&r1=932273&r2=932274&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
Fri Apr  9 07:36:21 2010
@@ -588,7 +588,12 @@ public class AggregateProcessor extends 
                         exchange.getIn().setHeader(Exchange.REDELIVERY_COUNTER, data.redeliveryCounter);
 
                         // resubmit the recovered exchange
-                        onSubmitCompletion(key, exchange);
+                        try {
+                            lock.lock();
+                            onSubmitCompletion(key, exchange);
+                        } finally {
+                            lock.unlock();
+                        }
                     }
                 }
             }



Mime
View raw message