i have an
@Singleton
public class RecurringEventBackgroundJob {
...
@Schedule(hour = "3")
public void execute(Timer timer) {
for (Data currentData : datalist) {
...
amethodwhichproducearuntimeexception();
...
}
}
private amethodwhichproducearuntimeexception() {
...
nullpointer_exception eventually happens here
}
}
scheduled task. because of a bug i got NPEX in the private method. Rollback was done. is OK. BUT! the schedule is restarted once again. (and got NPEX again) and after trying to do the task twice, doesn't tried more.
The question is: why the system tried to run second time the task? Is it possible to prevent this behavior?
thanks Peter