You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2015/01/27 12:22:53 UTC

svn commit: r1655010 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java

Author: jacopoc
Date: Tue Jan 27 11:22:52 2015
New Revision: 1655010

URL: http://svn.apache.org/r1655010
Log:
When selecting crashed JobSandbox records, disable cache: this makes sense for the specific use case but more importantly it fixes an intermittent deadlock issue that was occurring at startup when loading eca rules. Thanks to Arun Patidar and Deepak Dixit for reporting and analyzing the issue with me.


Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=1655010&r1=1655009&r2=1655010&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java Tue Jan 27 11:22:52 2015
@@ -292,7 +292,7 @@ public final class JobManager {
         EntityCondition statusCondition = EntityCondition.makeCondition(statusExprList, EntityOperator.OR);
         EntityCondition mainCondition = EntityCondition.makeCondition(UtilMisc.toList(EntityCondition.makeCondition("runByInstanceId", instanceId), statusCondition));
         try {
-            crashed = EntityQuery.use(delegator).from("JobSandbox").where(mainCondition).orderBy("startDateTime").queryList();
+            crashed = EntityQuery.use(delegator).from("JobSandbox").where(mainCondition).orderBy("startDateTime").cache(false).queryList();
         } catch (GenericEntityException e) {
             Debug.logWarning(e, "Unable to load crashed jobs", module);
         }