ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r586512 - in /ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine: BpelEngineImpl.java BpelProcess.java BpelRuntimeContextImpl.java
Date Fri, 19 Oct 2007 15:57:28 GMT
Author: vanto
Date: Fri Oct 19 08:57:27 2007
New Revision: 586512

URL: http://svn.apache.org/viewvc?rev=586512&view=rev
Log:
fixes ODE-199 in 1.1 branch

Modified:
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java?rev=586512&r1=586511&r2=586512&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
Fri Oct 19 08:57:27 2007
@@ -419,7 +419,12 @@
         // Note that the eventListeners list is a copy-on-write array, so need
         // to mess with synchronization.
         for (org.apache.ode.bpel.iapi.BpelEventListener l : _contexts.eventListeners) {
-            l.onEvent(event);
+    		try {
+    			l.onEvent(event);
+    		} catch (Throwable t) {
+    			// catch all possible exceptions
+    			__log.warn("Got an exception while notifying BpelEventListener '" + l + "'.", t);
+    		}
         }
     }
 

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java?rev=586512&r1=586511&r2=586512&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
Fri Oct 19 08:57:27 2007
@@ -541,18 +541,10 @@
 
     public void saveEvent(ProcessInstanceEvent event, ProcessInstanceDAO instanceDao) {
         markused();
-        List<String> scopeNames = null;
-        if (event instanceof ScopeEvent) {
-            scopeNames = ((ScopeEvent) event).getParentScopesNames();
-        }
-
-        boolean enabled = _pconf.isEventEnabled(scopeNames, event.getType());
-        if (enabled) {
-            if (instanceDao != null)
-                saveInstanceEvent(event, instanceDao);
-            else
-                __log.debug("Couldn't find instance to save event, no event generated!");
-        }
+        if (instanceDao != null)
+            saveInstanceEvent(event, instanceDao);
+        else
+            __log.debug("Couldn't find instance to save event, no event generated!");
     }
 
     void saveInstanceEvent(ProcessInstanceEvent event, ProcessInstanceDAO instanceDao) {

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java?rev=586512&r1=586511&r2=586512&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
Fri Oct 19 08:57:27 2007
@@ -1014,11 +1014,19 @@
         event.setProcessInstanceId(_dao.getInstanceId());
         _bpelProcess._debugger.onEvent(event);
 
-        // notify the listeners
-        _bpelProcess._engine.fireEvent(event);
+        //filter events
+        List<String> scopeNames = null;
+        if (event instanceof ScopeEvent) {
+            scopeNames = ((ScopeEvent) event).getParentScopesNames();
+        }
 
-        // saving
-        _bpelProcess.saveEvent(event, _dao);
+        if (_bpelProcess._pconf.isEventEnabled(scopeNames, event.getType())) {
+	        // notify the listeners
+	        _bpelProcess._engine.fireEvent(event);
+
+	        // saving
+	        _bpelProcess.saveEvent(event, _dao);
+		}
     }
 
     /**



Mime
View raw message