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 2008/09/04 20:35:12 UTC

svn commit: r692188 - in /ode/branches/APACHE_ODE_1.X: axis2/src/main/java/org/apache/ode/axis2/ bpel-api/src/main/java/org/apache/ode/bpel/iapi/ bpel-runtime/src/main/java/org/apache/ode/bpel/engine/

Author: mriou
Date: Thu Sep  4 11:35:11 2008
New Revision: 692188

URL: http://svn.apache.org/viewvc?rev=692188&view=rev
Log:
Process cleanup on undeploy (otherwise instances stick around for a process we have no definition for). Avoiding rescheduling when the process isn't registered anymore.

Modified:
    ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
    ode/branches/APACHE_ODE_1.X/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java
    ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
    ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java

Modified: ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java?rev=692188&r1=692187&r2=692188&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java Thu Sep  4 11:35:11 2008
@@ -597,6 +597,7 @@
             case DISABLED:
             case UNDEPLOYED:
                 _server.unregister(pse.pid);
+                _server.cleanupProcess(pse.pid);
                 break;
             default:
                 __log.debug("Ignoring store event: " + pse);

Modified: ode/branches/APACHE_ODE_1.X/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java?rev=692188&r1=692187&r2=692188&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java Thu Sep  4 11:35:11 2008
@@ -117,4 +117,6 @@
      */
     void unregister(QName pid) throws BpelEngineException;
 
+    void cleanupProcess(QName pid) throws BpelEngineException;
+
 }

Modified: ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java?rev=692188&r1=692187&r2=692188&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java Thu Sep  4 11:35:11 2008
@@ -395,12 +395,8 @@
             }
 
             if (process == null) {
-                // If the process is not active, it means that we should not be
-                // doing any work on its behalf, therefore we will reschedule the
-                // events for some time in the future (1 minute).
-                Date future = new Date(System.currentTimeMillis() + (60 * 1000));
-                __log.info(__msgs.msgReschedulingJobForInactiveProcess(we.getProcessId(), jobInfo.jobName, future));
-                _contexts.scheduler.schedulePersistedJob(jobInfo.jobDetail, future);
+                // The process is not active, there's nothing we can do with this job
+                __log.debug("Process " + we.getProcessId() + " can't be found, job abandoned.");
                 return;
             }
 

Modified: ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java?rev=692188&r1=692187&r2=692188&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java Thu Sep  4 11:35:11 2008
@@ -318,6 +318,10 @@
         }
     }
 
+    public void cleanupProcess(QName pid) throws BpelEngineException {
+        deleteProcessDAO(pid);
+    }
+
     /**
      * Register a global message exchange interceptor.
      * @param interceptor message-exchange interceptor
@@ -339,13 +343,12 @@
     /**
      * Check a state transition from state "i" to state "j".
      */
-    private final boolean checkState(State i, State j) {
+    private boolean checkState(State i, State j) {
         if (_state == i)
             return true;
         if (_state == j)
             return false;
         return false;
-//        throw new IllegalStateException("Unexpected state: " + i);
     }
 
     /* TODO: We need to have a method of cleaning up old deployment data. */