users@ejb-spec.java.net

[ejb-spec users] [jsr345-experts] Re: Persistent TimerService Clarifications

From: Adam Bien <abien_at_adam-bien.com>
Date: Fri, 4 May 2012 08:01:52 +0200

Perfect! Please include it!

But what about automatically created, persistent timers like @Schedule?
On 03.05.2012, at 22:17, Marina Vatkina wrote:

> How about adding this:
>
> "The timeout callback method for a programmatically created persistent timer is invoked on a single JVM instance regardless of the number of JVMs across which the container is distributed."
>
> If you agree, I'll confirm it with the EG.
>
> thanks,
> -marina
>
> Adam Bien wrote:
>> Hi Marina,
>>
>> I meant: a persistent timer is fired once per cluster and not once per server-instance.
>>
>> adam
>>
>> On 03.05.2012, at 21:10, Marina Vatkina wrote:
>>
>>
>>> Adam Bien wrote:
>>>
>>>> It feels right.
>>>>
>>>> Could you add a summary sentence. "A persistent timer is fired effectively once, even in distributed environment like e.g. cluster"
>>>>
>>> That's not always true - schedule-based timer can be coded such that it will never expire. And it can fire more than once, e.g. for a redelivery or periodic timer...
>>>
>>> -marina
>>>
>>>> thanks in advance!,
>>>>
>>>>
>>>> adam
>>>>
>>>> On 03.05.2012, at 18:23, Marina Vatkina wrote:
>>>>
>>>>
>>>>> I had added this text at the bottom of the p.322 in the EDR (as part of various clarifications):
>>>>>
>>>>> "The timeout callback method for a programmatically created persistent or non-persistent timer will be invoked on the JVM on which the timer was created. In the event of a container crash or container shutdown, the timeout callback method for a programmatically created persistent timer that has not been cancelled will be invoked on a new JVM when the container is restarted or on another JVM instance across which the container is distributed."
>>>>>
>>>>> If you think it needs to be expanded, please suggest your version or the extra text.
>>>>>
>>>>> thanks,
>>>>> -marina
>>>>>
>>>>> Reza Rahman wrote:
>>>>>
>>>>>> +1
>>>>>>
>>>>>> On 5/3/2012 1:33 AM, Adam Bien wrote:
>>>>>>
>>>>>>> Hi *,
>>>>>>>
>>>>>>> given persistent timers are coordinated in a shared DB, they should work-out-of the box in a cluster. It means: a timer should fire on a node, but not all nodes at the same time.
>>>>>>>
>>>>>>> It is one of the FAQs. Should we clarify that (or the supposed behavior) in the spec?
>>>>>>>
>>>>>>> thanks!,
>>>>>>>
>>>>>>> adam
>>>>>>>
>>>>>>> -----
>>>>>>> No virus found in this message.
>>>>>>> Checked by AVG - www.avg.com
>>>>>>> Version: 2012.0.1913 / Virus Database: 2425/4974 - Release Date: 05/02/12
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>
>>
>>