camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1345501 - in /camel/branches/camel-2.9.x: ./ components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java
Date Sat, 02 Jun 2012 12:15:04 GMT
Author: davsclaus
Date: Sat Jun  2 12:15:04 2012
New Revision: 1345501

URL: http://svn.apache.org/viewvc?rev=1345501&view=rev
Log:
CAMEL-5060: Fixed concurrency issue in camel-bam

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java
    camel/branches/camel-2.9.x/components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1345499

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java?rev=1345501&r1=1345500&r2=1345501&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java
Sat Jun  2 12:15:04 2012
@@ -18,7 +18,7 @@ package org.apache.camel.bam.model;
 
 import java.util.Collection;
 import java.util.Date;
-import java.util.HashSet;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 import javax.persistence.CascadeType;
 import javax.persistence.Entity;
@@ -42,7 +42,7 @@ import org.apache.camel.bam.rules.Activi
 @Table(name = "CAMEL_PROCESSINSTANCE")
 public class ProcessInstance {
     private ProcessDefinition processDefinition;
-    private Collection<ActivityState> activityStates = new HashSet<ActivityState>();
+    private Collection<ActivityState> activityStates = new CopyOnWriteArraySet<ActivityState>();
     private String correlationKey;
     private Date timeStarted;
     private Date timeCompleted;

Modified: camel/branches/camel-2.9.x/components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java?rev=1345501&r1=1345500&r2=1345501&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java
Sat Jun  2 12:15:04 2012
@@ -16,8 +16,8 @@
  */
 package org.apache.camel.bam.rules;
 
-import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.bam.model.ActivityState;
@@ -31,7 +31,7 @@ import org.apache.camel.util.ServiceHelp
  */
 public class ProcessRules extends ServiceSupport {
     private ProcessDefinition processDefinition;
-    private List<ActivityRules> activities = new ArrayList<ActivityRules>();
+    private List<ActivityRules> activities = new CopyOnWriteArrayList<ActivityRules>();
 
     public synchronized void processExpired(ActivityState activityState) throws Exception
{
         for (ActivityRules activityRules : activities) {



Mime
View raw message