When a job execution fails then the FailedJobListener is invoked which can decrement the retries and unlock the job. If the FailedJobListener throws an exception then the whole transaction rolls back and the job is still locked.
This can happen when an incident creation fails because of an optimistic lock exception.
- when the FailedJobListener throws an optimistic lock exception then try to invoke the listener again
- I can configure the amount of retries