You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/09/29 12:33:53 UTC

[1/6] git commit: CAMEL-6771: Fixed potential concurrency exception in splitter. Thanks to James Carman for patch.

Updated Branches:
  refs/heads/camel-2.11.x 2176e5885 -> 3e262b41f
  refs/heads/camel-2.12.x ed2c71a4c -> fa3e871b4
  refs/heads/master 41f5c83e6 -> 9f5b99802


CAMEL-6771: Fixed potential concurrency exception in splitter. Thanks to James Carman for patch.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3e58b69b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3e58b69b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3e58b69b

Branch: refs/heads/master
Commit: 3e58b69ba612b62fe9bc6f1cf5ac26fdba4e769c
Parents: 41f5c83
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Sep 29 12:17:25 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Sep 29 12:17:25 2013 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/processor/MulticastProcessor.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3e58b69b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index a0e150f..550a23e 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -1021,11 +1021,11 @@ public class MulticastProcessor extends ServiceSupport implements AsyncProcessor
         Map<?, ?> property = exchange.getProperty(Exchange.AGGREGATION_STRATEGY, Map.class);
         Map<Object, AggregationStrategy> map = CastUtils.cast(property);
         if (map == null) {
-            map = new HashMap<Object, AggregationStrategy>();
+            map = new ConcurrentHashMap<Object, AggregationStrategy>();
         } else {
             // it is not safe to use the map directly as the exchange doesn't have the deep copy of it's properties
             // we just create a new copy if we need to change the map
-            map = new HashMap<Object, AggregationStrategy>(map);
+            map = new ConcurrentHashMap<Object, AggregationStrategy>(map);
         }
         // store the strategy using this processor as the key
         // (so we can store multiple strategies on the same exchange)


[3/6] git commit: CAMEL-6771: Fixed potential concurrency exception in splitter. Thanks to James Carman for patch.

Posted by da...@apache.org.
CAMEL-6771: Fixed potential concurrency exception in splitter. Thanks to James Carman for patch.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c59c9c75
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c59c9c75
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c59c9c75

Branch: refs/heads/camel-2.12.x
Commit: c59c9c7557e89445a982211a4d3f9edf44130f2f
Parents: ed2c71a
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Sep 29 12:17:25 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Sep 29 12:32:59 2013 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/processor/MulticastProcessor.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c59c9c75/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index a0e150f..550a23e 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -1021,11 +1021,11 @@ public class MulticastProcessor extends ServiceSupport implements AsyncProcessor
         Map<?, ?> property = exchange.getProperty(Exchange.AGGREGATION_STRATEGY, Map.class);
         Map<Object, AggregationStrategy> map = CastUtils.cast(property);
         if (map == null) {
-            map = new HashMap<Object, AggregationStrategy>();
+            map = new ConcurrentHashMap<Object, AggregationStrategy>();
         } else {
             // it is not safe to use the map directly as the exchange doesn't have the deep copy of it's properties
             // we just create a new copy if we need to change the map
-            map = new HashMap<Object, AggregationStrategy>(map);
+            map = new ConcurrentHashMap<Object, AggregationStrategy>(map);
         }
         // store the strategy using this processor as the key
         // (so we can store multiple strategies on the same exchange)


[5/6] git commit: CAMEL-6771: Fixed potential concurrency exception in splitter. Thanks to James Carman for patch.

Posted by da...@apache.org.
CAMEL-6771: Fixed potential concurrency exception in splitter. Thanks to James Carman for patch.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d4171647
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d4171647
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d4171647

Branch: refs/heads/camel-2.11.x
Commit: d4171647265979224f44f6d5beb7ebc96f6c9f9e
Parents: 2176e58
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Sep 29 12:17:25 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Sep 29 12:33:34 2013 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/processor/MulticastProcessor.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d4171647/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index bd93719..3872d34 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -1014,11 +1014,11 @@ public class MulticastProcessor extends ServiceSupport implements AsyncProcessor
         Map<?, ?> property = exchange.getProperty(Exchange.AGGREGATION_STRATEGY, Map.class);
         Map<Object, AggregationStrategy> map = CastUtils.cast(property);
         if (map == null) {
-            map = new HashMap<Object, AggregationStrategy>();
+            map = new ConcurrentHashMap<Object, AggregationStrategy>();
         } else {
             // it is not safe to use the map directly as the exchange doesn't have the deep copy of it's properties
             // we just create a new copy if we need to change the map
-            map = new HashMap<Object, AggregationStrategy>(map);
+            map = new ConcurrentHashMap<Object, AggregationStrategy>(map);
         }
         // store the strategy using this processor as the key
         // (so we can store multiple strategies on the same exchange)


[6/6] git commit: Polished

Posted by da...@apache.org.
Polished


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3e262b41
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3e262b41
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3e262b41

Branch: refs/heads/camel-2.11.x
Commit: 3e262b41fe9766c0e69ccc2019d9d98727b60f35
Parents: d417164
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Sep 29 12:17:36 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Sep 29 12:33:45 2013 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/impl/JndiRegistry.java    | 8 +++++---
 .../apache/camel/processor/aggregate/AggregateProcessor.java | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3e262b41/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java b/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
index 5a63e48..173587d 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
@@ -117,16 +117,18 @@ public class JndiRegistry implements Registry {
         return findByTypeWithName(type);
     }
 
-    public void bind(String s, Object o) {
+    public void bind(String name, Object object) {
         try {
-            getContext().bind(s, o);
+            getContext().bind(name, object);
         } catch (NamingException e) {
             throw new RuntimeCamelException(e);
         }
     }
 
     public void close() throws NamingException {
-        getContext().close();
+        if (context != null) {
+            context.close();
+        }
     }
 
     public Context getContext() throws NamingException {

http://git-wip-us.apache.org/repos/asf/camel/blob/3e262b41/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
index 46ef290..c490008 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
@@ -483,7 +483,7 @@ public class AggregateProcessor extends ServiceSupport implements Processor, Nav
             ((CompletionAwareAggregationStrategy) aggregationStrategy).onCompletion(exchange);
         }
 
-            // send this exchange
+        // send this exchange
         executorService.submit(new Runnable() {
             public void run() {
                 LOG.debug("Processing aggregated exchange: {}", exchange);


[4/6] git commit: Polished

Posted by da...@apache.org.
Polished


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fa3e871b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fa3e871b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fa3e871b

Branch: refs/heads/camel-2.12.x
Commit: fa3e871b461fdcfe03aada1efe3f15c80dd0e5db
Parents: c59c9c7
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Sep 29 12:17:36 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Sep 29 12:33:07 2013 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/impl/JndiRegistry.java    | 8 +++++---
 .../apache/camel/processor/aggregate/AggregateProcessor.java | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fa3e871b/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java b/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
index 5a63e48..173587d 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
@@ -117,16 +117,18 @@ public class JndiRegistry implements Registry {
         return findByTypeWithName(type);
     }
 
-    public void bind(String s, Object o) {
+    public void bind(String name, Object object) {
         try {
-            getContext().bind(s, o);
+            getContext().bind(name, object);
         } catch (NamingException e) {
             throw new RuntimeCamelException(e);
         }
     }
 
     public void close() throws NamingException {
-        getContext().close();
+        if (context != null) {
+            context.close();
+        }
     }
 
     public Context getContext() throws NamingException {

http://git-wip-us.apache.org/repos/asf/camel/blob/fa3e871b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
index 8e2a26f..ca39061 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
@@ -501,7 +501,7 @@ public class AggregateProcessor extends ServiceSupport implements AsyncProcessor
             ((CompletionAwareAggregationStrategy) aggregationStrategy).onCompletion(exchange);
         }
 
-            // send this exchange
+        // send this exchange
         executorService.submit(new Runnable() {
             public void run() {
                 LOG.debug("Processing aggregated exchange: {}", exchange);


[2/6] git commit: Polished

Posted by da...@apache.org.
Polished


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9f5b9980
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9f5b9980
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9f5b9980

Branch: refs/heads/master
Commit: 9f5b99802484661177e22c80a06ea7f228a88a1d
Parents: 3e58b69
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Sep 29 12:17:36 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Sep 29 12:17:36 2013 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/impl/JndiRegistry.java    | 8 +++++---
 .../apache/camel/processor/aggregate/AggregateProcessor.java | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9f5b9980/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java b/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
index 5a63e48..173587d 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
@@ -117,16 +117,18 @@ public class JndiRegistry implements Registry {
         return findByTypeWithName(type);
     }
 
-    public void bind(String s, Object o) {
+    public void bind(String name, Object object) {
         try {
-            getContext().bind(s, o);
+            getContext().bind(name, object);
         } catch (NamingException e) {
             throw new RuntimeCamelException(e);
         }
     }
 
     public void close() throws NamingException {
-        getContext().close();
+        if (context != null) {
+            context.close();
+        }
     }
 
     public Context getContext() throws NamingException {

http://git-wip-us.apache.org/repos/asf/camel/blob/9f5b9980/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
index 1f0336c..8fe24c5 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
@@ -532,7 +532,7 @@ public class AggregateProcessor extends ServiceSupport implements AsyncProcessor
             ((CompletionAwareAggregationStrategy) aggregationStrategy).onCompletion(exchange);
         }
 
-            // send this exchange
+        // send this exchange
         executorService.submit(new Runnable() {
             public void run() {
                 LOG.debug("Processing aggregated exchange: {}", exchange);