Hide Forgot
Date of First Response: 2009-12-02 20:30:19 Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/351664 Workaround Description: 1. Open $SOA_HOME/jbpm-jpdl/src/jpdl/org/jbpm/db/hibernate.queries.hbm.xml 2. Replace 'where job.lockTime > :threshold' with 'where job.lockTime < :threshold' 3. Copy $SOA_HOME/jbpm-jpdl/src/jpdl/org/jbpm/db/hibernate.queries.hbm.xml to $SOA_HOME/jboss-as/server/$SOA_CONFIG/deploy/jbpm.esb/ 4. Open $SOA_HOME/jboss-as/server/$SOA_CONFIG/deploy/jbpm.esb/hibernate.cfg.xml 5. Replace <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml"/> with <mapping resource="hibernate.queries.hbm.xml"/> project_key: SOA Platform issue for JBPM-2608: JobSession.findJobsWithOverdueLockTime returns incorrect list of overdue jobs for LockMonitorThread
Link: Added: This issue depends JBPM-2608
The incorrect behavior of the LockMonitorThread can be reproduced with a modified bpm_orchestration1 quickstart: 1. In $SOA_HOME/jboss-as/samples/quickstarts/bpm_orchestration1/processDefinition/processdefinition.xml, add a Thread.sleep to simulate a longer running action: <node name="node2"> <event type="node-enter"> <script> System.out.println("****** jBPM SLEEP *****"); Thread.sleep(10000); </script> </event> [...] </node> 2. In $SOA_HOME/jboss-as/server/$SOA_CONFIG/deploy/jbpm.esb/jbpm.cfg.xml lower the lockMonitorInterval value to make sure the LockMonitor attempts to unlock overdue job within the time the thread above is sleeping: <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor"> [...] <field name="lockMonitorInterval"><int value="3000" /> [...] </bean> 3. Deploy and run the quickstart as usual, which will result in a StaleObjectStateException on the LockMonitorThread.
Resolving platform issue as the project peer JBPM-2608 has been resolved.
Please review the following draft text for the Resolved Issues section of the Release Notes: https://jira.jboss.org/jira/browse/JBPM-2608 org.jbpm.job.executor.LockMonitorThread#unlockOverdueJobs() used an erroneous query to return the list of overdue logs to be unlocked. As a consequence, an org.hibernate.StaleObjectStateException exception would occur. To rectify this problem the where clause in the query has been reordered and the JobSession.findJobsWithOverdueLockTime now passes the threshold as a timestamp rather than a date. As a result, an accurate list of overdue jobs is now returned and the exception is no longer generated.
Verified in 4.3.CP03 ER1