List of usage examples for org.springframework.scheduling.support TaskUtils getDefaultErrorHandler
public static ErrorHandler getDefaultErrorHandler(boolean isRepeatingTask)
From source file:be.vlaanderen.sesam.monitor.internal.util.ThreadPoolTaskScheduler.java
public ScheduledFuture schedule(Runnable task, Trigger trigger) { ScheduledExecutorService executor = getScheduledExecutor(); try {/*from w ww . ja v a2s. co m*/ ErrorHandler errorHandler = this.errorHandler != null ? this.errorHandler : TaskUtils.getDefaultErrorHandler(true); return new ReschedulingRunnable(task, trigger, executor, errorHandler).schedule(); } catch (RejectedExecutionException ex) { throw new TaskRejectedException("Executor [" + executor + "] did not accept task: " + task, ex); } }