| Summary: | JBPM-2608: JobSession.findJobsWithOverdueLockTime returns incorrect list of overdue jobs for LockMonitorThread | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise SOA Platform 4 | Reporter: | Martin Weiler <mweiler> |
| Component: | JBPM - within SOA, JBPM - standalone | Assignee: | Alejandro Guizar <alex.guizar> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.3 CP02 | CC: | dlesage |
| Target Milestone: | --- | ||
| Target Release: | 4.3 CP04 ER1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/SOA-1571 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-03-24 12:36:28 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Martin Weiler
2009-10-28 11:15:21 UTC
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 |