最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Tomee 9 TimerService database storage - Stack Overflow

programmeradmin9浏览0评论

My Jakarta web application uses TimerService to schedule tasks in future.

Everything is working fine (timer are created and timeout methods executed in time) except that timer that should be persistent are not.

The reason is Tomee 9 uses Quartz with a RAMJobStore by default.

I tried to configure it via the system.properties / application.properties but it does not find the datasource (no problem for Hibernate) :

.apache.openejb.quartz.jobStore.class = .apache.openejb.quartz.impl.jdbcjobstore.JobStoreCMT
.apache.openejb.quartz.jobStore.dataSource = myDataSource
.apache.openejb.quartz.dataSource.myDataSource.jndiURL = java:comp/env/MyDataSource

but it throws :

21-Mar-2025 15:55:37.286 GRAVE [main] .apache.openejb.quartz.utils.JNDIConnectionProvider.init Error looking up datasource: Le Nom [comp/env/MyDataSource] n'est pas lié à ce Contexte
    javax.naming.NameNotFoundException: Le Nom [comp/env/MyDataSource] n'est pas lié à ce Contexte

Is it possible to configure Quartz using resources.xml to make it use a JobStoreCMT instead of a RAMJobStore ?

发布评论

评论列表(0)

  1. 暂无评论