You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2007/06/04 17:40:35 UTC

svn commit: r544167 - /incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java

Author: mriou
Date: Mon Jun  4 08:40:31 2007
New Revision: 544167

URL: http://svn.apache.org/viewvc?view=rev&rev=544167
Log:
Cleaning up a few held ids.

Modified:
    incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java

Modified: incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java?view=diff&rev=544167&r1=544166&r2=544167
==============================================================================
--- incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java (original)
+++ incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java Mon Jun  4 08:40:31 2007
@@ -132,9 +132,11 @@
         ProcessInstanceDAO removed = _instances.remove(instance.getInstanceId());
         if (removed == null) {
             // Checking for leftover instances that should be removed
-            for (Long iid : _instancesToRemove) {
+            ArrayList<Long> removals = new ArrayList<Long>(_instancesToRemove);
+            for (Long iid : removals) {
                 _instances.remove(iid);
             }
+            _instancesToRemove.removeAll(removals);
 
             // The instance can't be found probably because the transaction isn't committed yet and
             // it doesn't exist. Saving its id for later cleanup.