I compared the sources of 1.7.4 and 7.0.2 regarding the packae
org.apache.openejb.core.timer. From that I did not expect big
differences. But I could give it a try. I think I should try the variant
with quartz connected to a database?

On 10.03.2017 12:45, Romain Manni-Bucau wrote:
> I see,
>
> did you try on tomee 7? recall we fixed some things in that are, not sure
> it fixes this exact case but 1.7 is quite old on that topic
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2017-03-10 12:36 GMT+01:00 Bodo Pfelzer <bodo.pfel...@business-logics.de>:
>
>> In my EJB I use timerService.createTimer() to schedule a task for next
>> month. And this task should be executed regardless whether the server is
>> restarted or not in the meantime.
>>
>> On 10.03.2017 12:29, Romain Manni-Bucau wrote:
>>> the timerstore need is mainly to handle the transactionality AFAIK and
>>> doesnt assume anything about quartz or not. We can surely drop a part
>> today.
>>> Not sure what you mean by "persistent quartz timer are wanted", have to
>>> admit I almost always use not persistent timers.
>>>
>>> Do you try to solve a particular issue?
>>>
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>> <https://blog-rmannibucau.rhcloud.com> | Old Blog
>>> <http://rmannibucau.wordpress.com> | Github <https://github.com/
>> rmannibucau> |
>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
>>> <https://javaeefactory-rmannibucau.rhcloud.com>
>>>
>>> 2017-03-10 12:17 GMT+01:00 Bodo Pfelzer <bodo.pfel...@business-logics.de
>>> :
>>>
>>>> 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 https://issues.apache.org/jira/browse/OPENEJB-1867 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 TimerStore.
>>>>
>>>> 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.
>>>>
>>>> Bodo
>>>>
>>>> On 09.03.2017 15:00, Romain Manni-Bucau wrote:
>>>>
>>>> Hi
>>>>
>>>> needs a custom timerstore I think (seehttps://issues.apache.org/
>> jira/browse/TOMEE-785)
>>>>
>>>> Romain Manni-Bucau
>>>> @rmannibucau <https://twitter.com/rmannibucau> <https://twitter.com/
>> rmannibucau> |  Blog<https://blog-rmannibucau.rhcloud.com> <
>> https://blog-rmannibucau.rhcloud.com> | Old Blog<http://rmannibucau.
>> wordpress.com> <http://rmannibucau.wordpress.com> | Github <
>> https://github.com/rmannibucau> <https://github.com/rmannibucau> |
>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> <
>> https://www.linkedin.com/in/rmannibucau> | JavaEE Factory<
>> https://javaeefactory-rmannibucau.rhcloud.com> <https://javaeefactory-
>> rmannibucau.rhcloud.com>
>>>> 2017-03-09 14:44 GMT+01:00 Bodo Pfelzer <bodo.pfelzer@business-logics.
>> de> <bodo.pfel...@business-logics.de>:
>>>>
>>>> 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 system.properties. 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
>>>>
>>>>
>>>>
>>>>
>>>>
>>

Reply via email to