why do you think it is only the latest job?
For me it is all jobs that have
- a specific lockowner or nolockowener
- more then 0 retries configured
- a due date that is in the past-
- are not suspended
oh,I am sorry , you know, the result retrieved from db has been limited to the first one within java method.
What I really mean is : how can we assure that the acquired one is due to be executed?
I am understand this point now after noticing that the duedate 'value is a future time.