tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bodo Pfelzer <>
Subject Re: Persistent timers not working in TomEE?
Date Fri, 10 Mar 2017 11:17:10 GMT
Hi Romain,

I do not really understand the interplay between quartz, TimerStore and
EjbTimerServiceImpl. As far as I understand, EjbTimerServiceImpl writes
all Timers into quartz and TimerStore. TimerStore contains the Timers
that are visible to the EJB and quartz contains the Timers that are
actually executed. Reading I assume, that using
persistent quartz timers is allowed and even wanted in TomEE, but the
persisted timers are neglected by TimerStore during startup. My ugly
patch (see attached file) copies the Timers persisted by quartz into

But I do not understand the need for the TimerStore itself. In my
opinion one could avoid the duplicate storage of Timers and retrieve
everything from quartz itself, especially when using different
GroupNames for different deployments. Is there any reason for that?
Otherwise I would like to adjust EjbTimerServiceImpl in a way that does
not need a TimerStore, or at least try a "QuartzTimerStore". But
modifiying the group name would be nice for that.


On 09.03.2017 15:00, Romain Manni-Bucau wrote:
> Hi
> needs a custom timerstore I think (see
> Romain Manni-Bucau
> @rmannibucau <> |  Blog
> <> | Old Blog
> <> | Github <>
> LinkedIn <> | JavaEE Factory
> <>
> 2017-03-09 14:44 GMT+01:00 Bodo Pfelzer <>:
>> I tried to configure persistent timers in TomEE-1.7.4 by adding:
>> org.apache.openejb.quartz.jobStore.class
>> org.apache.openejb.quartz.impl.jdbcjobstore.JobStoreCMT
>> org.apache.openejb.quartz.jobStore.driverDelegateClass
>> org.apache.openejb.quartz.impl.jdbcjobstore.StdJDBCDelegate
>> org.apache.openejb.quartz.jobStore.dataSource             ActiveDataSource
>> org.apache.openejb.quartz.jobStore.nonManagedTXDataSource
>> NoTxActiveDataSource
>> org.apache.openejb.quartz.dataSource.ActiveDataSource.jndiURL
>> openejb:Resource/ActiveDataSource
>> org.apache.openejb.quartz.dataSource.NoTxActiveDataSource.jndiURL
>> openejb:Resource/NoTxActiveDataSource
>> to my And yes, my EJB method annotated with @Timeout
>> gets called, even if TomEE was restarted during the creation of the
>> timer and its expiration. But two things do not work as expected:
>> timerServer.getTimers() returns an empty collection after restart though
>> active timers exist. And perhaps even worse: Old timers get overwritten
>> by new ones, since MemoryTimerStore.counter always starts from zero
>> after restart.
>> Am I missing something in my configuration? How could I replace
>> MemoryTimerStore?
>> Best regards,
>> Bodo

View raw message