History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QUARTZ-134
Type: Bug Bug
Status: Closed Closed
Resolution: Not A Problem
Priority: Major Major
Assignee: James House
Reporter: khachchou mohammed
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

Probem with Stateful jobs

Created: 21/Feb/05 04:27 AM   Updated: 13/Mar/05 05:35 PM
Component/s: Job Stores
Affects Version/s: 1.4.4
Fix Version/s: 1.4.5


 Description  « Hide
in case of a stateful job, there is no need to update trigger state from 'STATE_BLOCKED' to 'SATTE_WAINTING' if the trigger won't fire again.
The code that has to be changed is the following :

- method triggeredJobComplete, class JobStoreSupport :

if (jobDetail.isStateful()) {
    getDelegate().updateTriggerStatesForJobFromOtherState(conn,
        jobDetail.getName(), jobDetail.getGroup(),
        STATE_WAITING, STATE_BLOCKED);
     .....
}

must be replaced by the code :

if (jobDetail.isStateful()) {
    String newState = STATE_COMPLETE;
    if (trigger.getNextFireTime() != null) {
       newState = STATE_WAITING;
    }
    getDelegate().updateTriggerStatesForJobFromOtherState(conn,
        jobDetail.getName(), jobDetail.getGroup(),
        newState, STATE_BLOCKED);
}

regards.

 All   Comments   Change History      Sort Order:
James House - [02/Mar/05 06:15 PM ]

Yes, but if the trigger won't fire again, it would have been taken care of in the preceding block of code. Thus only those triggers that are still "blocked" get set to "waiting".