jakarta-ee - WFLYEJB0043 : A previous execution of timer [timer] is still in progress, 在 [时间] 跳过这个重叠的计划执行

标签 jakarta-ee timer ejb wildfly ejb-timer

我在单例 EJB 中定义了一些持久性计时器,如下所示(使用 WildFly 9.0.2 final)。

@Startup
@Singleton
@Lock(LockType.READ)
public class BackgroundJobManager implements BackgroundJobService {

    @Schedule(dayOfMonth = "1", month = "Jan", year = "*", hour = "0", minute = "0", second = "0", persistent = true)
    private void doYearlyJob() {
        //...
    }

    @Schedule(hour = "*", minute = "*/5", second = "0", persistent = true)
    private void updateTopSellers() {
        //...
    }

    @Schedule(hour = "*", minute = "*/1", second = "0", persistent = true)
    private void updateFeedback() {
        //...
    }

    //...
}

在服务器启动和重新部署应用程序时会发出几个警告,如下所示(这些只是其中的几个)。
19:46:51,687 WARN  [org.jboss.as.ejb3] (EJB default - 3) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:25:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:51 IST 2015.
19:46:51,796 WARN  [org.jboss.as.ejb3] (EJB default - 4) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 22:50:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:51 IST 2015.
19:46:51,890 WARN  [org.jboss.as.ejb3] (EJB default - 5) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:26:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:51 IST 2015.
19:46:51,953 WARN  [org.jboss.as.ejb3] (EJB default - 6) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 22:55:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:51 IST 2015.
19:46:51,984 WARN  [org.jboss.as.ejb3] (EJB default - 7) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:27:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:51 IST 2015.
19:46:52,062 WARN  [org.jboss.as.ejb3] (EJB default - 8) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 23:00:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,218 WARN  [org.jboss.as.ejb3] (EJB default - 9) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:28:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,328 WARN  [org.jboss.as.ejb3] (EJB default - 10) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 23:05:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,390 WARN  [org.jboss.as.ejb3] (EJB default - 3) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:29:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,453 WARN  [org.jboss.as.ejb3] (EJB default - 4) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 23:10:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,484 WARN  [org.jboss.as.ejb3] (EJB default - 5) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:30:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,531 WARN  [org.jboss.as.ejb3] (EJB default - 6) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 23:15:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,593 WARN  [org.jboss.as.ejb3] (EJB default - 7) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:31:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,687 WARN  [org.jboss.as.ejb3] (EJB default - 8) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 23:20:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,781 WARN  [org.jboss.as.ejb3] (EJB default - 9) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:32:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.

定时器服务在 standalone-full-ha.xml 中定义如下。

<timer-service thread-pool-name="default" default-data-store="clustered-store">
    <data-stores>
        <database-data-store name="clustered-store" datasource-jndi-name="java:jboss/datasources/projectXADatasource" database="mysql" partition="timer"/>
    </data-stores>
</timer-service>

这些警告也会出现,当这些计时器持久保存到文件系统而不是数据库时,无论应用程序是部署在集群 ( standalone-full-ha.xml ) 还是非集群 ( standalone-full.xml ) 环境中。

我定期刷新 standalone/data 的所有内容(除了已部署的 JDBC 驱动程序和自定义内容),standalone/deploymentsstandalone/tmp必要时。 standalone/data 中不再提供计时器的症状就像以前一样,当计时器最初被持久化到文件系统时。

有解决办法吗?

有一个question但我对给出的答案不满意(抱歉)。此外,该问题使用 JBoss EAP 6.4 以及为什么标签 在应用程序服务器中使用 EJB 时出现在那里对我来说是个谜。

更新:

该问题在 WildFly 10.0.0 最终版中保持不变。

最佳答案

这是一个公认的错误。见 https://issues.jboss.org/browse/WFLY-6561 .

该错误也已应用于 JBoss 7:https://issues.jboss.org/browse/JBEAP-4442

关于jakarta-ee - WFLYEJB0043 : A previous execution of timer [timer] is still in progress, 在 [时间] 跳过这个重叠的计划执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34241076/

相关文章:

java - 将 JAAS 与 Wildfly 集成

java - apache commons lang3 stringutils taglib

java - Eclipse 中缺少动态 Web 项目选项

java - 检查 Java 定时器是否被取消

java - EJB3 注入(inject)在 Wicket AuthenticateWebSession 中为 Null

java - 如何用JPA映射一个HashMap?

javascript - 计时器未使用clearInterval()重置

c++ - Qt5 : How to wait for a signal in a thread?

java - HTTP 状态 404 - 请求的资源不可用

java - 在 EJB 3 和设计模式中使用客户端 jar