Files
ofbiz-framework/framework/service
Jacopo Cappellato 71891a76fb Moved out from JobManager.getInstance the call to reloadCrashedJobs because it was causing a deadlock issue at bootstrap when an eca rule of type "validate" is defined on the JobSandbox entity.
At bootstrap an eca definition like the following:
   <eca entity="JobSandbox" operation="store" event="validate">
          <action service="ping" mode="sync"/>
   </eca>
 is causing a deadlock because it is triggered at startup when the reloadCrashedJobs method is executed; reloadCrashedJobs  is executed holding a lock on the JobManager object; within this method a "find" operation is performed that (because of the "validate" event) triggers the action; but for this a getDispatchContext is executed and this blocks until the task (executed by a thread Executor) that reads and setups the eca rules is complete; but this task requires a lock on the same JobManager object and thus we get the deadlock
Thanks to Arun Patidar and Deepak Dixit for analyzing the issue with me.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1655046 13f79535-47bb-0310-9956-ffa450edef68
2015-01-27 14:02:50 +00:00
..
2010-03-17 17:28:01 +00:00