Author: lektran
Date: Thu Oct 22 20:27:10 2009
New Revision: 828839
URL:
http://svn.apache.org/viewvc?rev=828839&view=revLog:
Fixed a bug in the RouteEngine service engine (engine="route") where no ECAs were being triggered when running a route service asynchronously, this is caused because in general ECAs aren't triggered until a service is called synchronously but the RouteEngine was simply returning instead of doing a runSync on a separate thread. Fixed this by changing the RouteEngine to extend the GenericAsyncEngine and letting it handle the async calls in the same way it does for other engines.
Modified:
ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/RouteEngine.java
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/RouteEngine.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/RouteEngine.java?rev=828839&r1=828838&r2=828839&view=diff==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/RouteEngine.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/RouteEngine.java Thu Oct 22 20:27:10 2009
@@ -20,9 +20,6 @@
import java.util.Map;
-import javolution.util.FastMap;
-
-import org.ofbiz.service.GenericRequester;
import org.ofbiz.service.GenericServiceException;
import org.ofbiz.service.ModelService;
import org.ofbiz.service.ServiceDispatcher;
@@ -30,9 +27,11 @@
/**
* RouteEngine.java
*/
-public class RouteEngine implements GenericEngine {
+public class RouteEngine extends GenericAsyncEngine {
- public RouteEngine(ServiceDispatcher dispatcher) { }
+ public RouteEngine(ServiceDispatcher dispatcher) {
+ super(dispatcher);
+ }
/**
* @see org.ofbiz.service.engine.GenericEngine#runSync(java.lang.String, org.ofbiz.service.ModelService, java.util.Map)
@@ -48,20 +47,6 @@
return;
}
- /**
- * @see org.ofbiz.service.engine.GenericEngine#runAsync(java.lang.String, org.ofbiz.service.ModelService, java.util.Map, org.ofbiz.service.GenericRequester, boolean)
- */
- public void runAsync(String localName, ModelService modelService, Map<String, Object> context, GenericRequester requester, boolean persist) throws GenericServiceException {
- requester.receiveResult(FastMap.<String, Object>newInstance());
- }
-
- /**
- * @see org.ofbiz.service.engine.GenericEngine#runAsync(java.lang.String, org.ofbiz.service.ModelService, java.util.Map, boolean)
- */
- public void runAsync(String localName, ModelService modelService, Map<String, Object> context, boolean persist) throws GenericServiceException {
- return;
- }
-
public void sendCallbacks(ModelService modelService, Map<String, Object> context, int mode) throws GenericServiceException {
}