问题
I am using JBOSS EAP 6.4 . I have schedule some schedulers in my ScedulerBean using EJB @Shedule annotation as follows. Here the ShedulerBean is dependson StartupBean.
@Singleton
@DependsOn("StartupBean")
public class SchedulerBean {
private Logger logger = LoggerFactory.getLogger(SchedulerBean.class);
private SchedulerInterface schedulerInterface;
@PostConstruct
public void initialize() {
// some initialization
}
@Schedule(second = "1/1", minute = "*", hour = "*",persistent = false)
public void runSchedulers() {
logger.info("EJB scheduler pulse start at : " + new Date());
try {
schedulerInterface.pulseEverySecond();
logger.info("EJB scheduler pulse end at : " + new Date());
} catch (Exception e) {
logger.error("Error in EJB scheduling : ", e);
}
}
}
But, I am repeatedly getting following warning during JBOSS Deployment. Can any one tell me a way to resolve this?
A previous execution of timer [ShedularBean] is still in progress, skipping this overlapping scheduled execution at: [Timestamp] as timer state is IN_TIMEOUT
回答1:
Since you are running the task every second, it means that the previous scheduled task (of the current second-1 ) is still in progress when the current task is scheduled.
Hence jboss is informing you that it will skip this execution.
Refer this for more details: https://issues.jboss.org/browse/AS7-3119
来源:https://stackoverflow.com/questions/31402471/jboss-previos-execution-of-timer-is-still-progress-timer-state-is-in-timeout