
|
If you were logged in you would be able to see more operations.
|
|
|
|
JTAJobRunShell tries to make sure that the UserTransaction is always returned to the UserTransactionHelper.
However, it has to depend on JobRunShell.run() eventually calling either complete() or passivate() (via jobRunShellFactory.returnJobRunShell())
There are two worries I have with the following code in JobRunShell.run():
if (!completeTriggerRetryLoop(trigger, jobDetail, instCode))
;
return;
1. It looks like a bug because the if doesn't do anything. The code is the same as:
completeTriggerRetryLoop(trigger, jobDetail, instCode);
return;
Presumably the intent was
if (!completeTriggerRetryLoop(trigger, jobDetail, instCode)) {
return;
}
2. When it does return, it does not call jobRunShellFactory.returnJobRunShell(this). I guess this used to be okay if the first problem was fixed because it meant that the scheduler was shutdown anyway, but now it means that the UserTransaction is never returned. It seems like it would be fine to still return the JobRunShell even if the scheduler is shutdown, so maybe that last line can just be moved into a finally block around the entire run() method.
|
|
Description
|
JTAJobRunShell tries to make sure that the UserTransaction is always returned to the UserTransactionHelper.
However, it has to depend on JobRunShell.run() eventually calling either complete() or passivate() (via jobRunShellFactory.returnJobRunShell())
There are two worries I have with the following code in JobRunShell.run():
if (!completeTriggerRetryLoop(trigger, jobDetail, instCode))
;
return;
1. It looks like a bug because the if doesn't do anything. The code is the same as:
completeTriggerRetryLoop(trigger, jobDetail, instCode);
return;
Presumably the intent was
if (!completeTriggerRetryLoop(trigger, jobDetail, instCode)) {
return;
}
2. When it does return, it does not call jobRunShellFactory.returnJobRunShell(this). I guess this used to be okay if the first problem was fixed because it meant that the scheduler was shutdown anyway, but now it means that the UserTransaction is never returned. It seems like it would be fine to still return the JobRunShell even if the scheduler is shutdown, so maybe that last line can just be moved into a finally block around the entire run() method. |
Show » |
|
QUARTZ-374), I went ahead and fixed issue 1 to be what it looked like the intent was.