JBOSS - Previos execution of timer is still progress,timer state is IN_TIMEOUT

守給你的承諾、 提交于 2019-12-10 18:25:19

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!