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/07/02 21:08:06 UTC
svn commit: r552565 -
/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
Author: mriou
Date: Mon Jul 2 12:08:05 2007
New Revision: 552565
URL: http://svn.apache.org/viewvc?view=rev&rev=552565
Log:
Only deactivating if no other process (version) need that endpoint anymore.
Modified:
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
Modified: incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java?view=diff&rev=552565&r1=552564&r2=552565
==============================================================================
--- incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java (original)
+++ incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java Mon Jul 2 12:08:05 2007
@@ -48,10 +48,7 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Random;
+import java.util.*;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
@@ -190,9 +187,17 @@
if (__log.isDebugEnabled())
__log.debug("Deactivating process " + p.getPID());
- p.deactivate();
- while (_serviceMap.values().remove(p))
- ;
+ Endpoint processEndpoint = null;
+ for (Map.Entry<Endpoint,BpelProcess> processEntry : _serviceMap.entrySet()) {
+ if (processEntry.getValue()._pid.equals(process)) {
+ _serviceMap.remove(processEntry.getKey());
+ processEndpoint = processEntry.getKey();
+ }
+ }
+
+ // Only deactivating if no other process (version) need that endpoint anymore
+ if (_serviceMap.get(processEndpoint) == null)
+ p.deactivate();
}
return p;
}