You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bo...@apache.org on 2007/01/29 18:16:03 UTC

svn commit: r501116 - /incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java

Author: boisvert
Date: Mon Jan 29 09:16:02 2007
New Revision: 501116

URL: http://svn.apache.org/viewvc?view=rev&rev=501116
Log:
Don't process WorkEvent if process is not active

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=501116&r1=501115&r2=501116
==============================================================================
--- 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 Jan 29 09:16:02 2007
@@ -51,9 +51,9 @@
 /**
  * Implementation of the {@link BpelEngine} interface: provides the server methods that should be invoked in the context of a
  * transaction.
- * 
+ *
  * @author mszefler
- * 
+ *
  */
 public class BpelEngineImpl implements BpelEngine {
     private static final Log __log = LogFactory.getLog(BpelEngineImpl.class);
@@ -189,7 +189,7 @@
 
     /**
      * Register a process with the engine.
-     * 
+     *
      * @param process
      *            the process to register
      */
@@ -205,7 +205,7 @@
     /**
      * Route to a process using the service id. Note, that we do not need the endpoint name here, we are assuming that two processes
      * would not be registered under the same service qname but different endpoint.
-     * 
+     *
      * @param service
      *            target service id
      * @param request
@@ -292,9 +292,9 @@
                 Date future = new Date(System.currentTimeMillis() + (60 * 1000));
                 __log.info(__msgs.msgReschedulingJobForInactiveProcess(processDao.getProcessId(), jobInfo.jobName, future));
                 _contexts.scheduler.schedulePersistedJob(jobInfo.jobDetail, future);
+                return;
             }
 
-            assert process != null;
             process.handleWorkEvent(jobInfo.jobDetail);
             debuggingDelay();
         } catch (BpelEngineException bee) {
@@ -343,8 +343,8 @@
         } else {
             saveToDisk = true;
         }
-        
-        if (saveToDisk)  
+
+        if (saveToDisk)
             try {
                 File f = File.createTempFile("ode-bad-job", ".ser", new File(""));
                 ObjectOutputStream fos = new ObjectOutputStream(new FileOutputStream(f));
@@ -354,7 +354,7 @@
             } catch (Exception ex) {
                 __log.error("Could not save bad job; it will be lost: " + jobInfo, ex);
             }
-        
+
 
         // No more retries.
         return false;
@@ -400,7 +400,7 @@
 
     /**
      * Get the list of globally-registered message-exchange interceptors.
-     * 
+     *
      * @return list
      */
     List<MessageExchangeInterceptor> getGlobalInterceptors() {