Hi Romain!
No, it's not the same transaction.
If test client ends (without canceling the calendar timer) and is started again
just asking for available timers: It still gets the already fired calendar
timer (with next timeout still set to the timestamp in the past).
Best regards,
Thomas
Von: Romain Manni-Bucau [via OpenEJB]
[mailto:[email protected]]
Gesendet: Montag, 5. August 2013 13:34
An: Thomas Schuler
Betreff: Re: Fired calendar trigger still available
when do you check getTimers()?
if you are in a transaction the remove is done after the transaction (so
typically can't be tested in the same method)
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2013/8/5 tschuler <[hidden
email]</user/SendEmail.jtp?type=node&node=4664529&i=0>>
> Hi Romain!
>
> Here is an example:
>
> - timerTests.zip: A web application including only the scheduled
> bean to test - simply put it to %TOMEE_HOME%/webapps.
>
> - timerTests.src.zip: Includes the sources for the timer Tests:
>
> o \timerTests\server: the scheduled bean
>
> o \timerTests\client: The test client - of interest is the method
> testDateTriggerFiring - it shows the described behavior.
>
> - Tomee.xml: defines two data sources for a mssql server on
> localhost with database tomee for quartz persistence.
>
> Best regards,
> Thomas
>
>
>
> Von: Romain Manni-Bucau [via OpenEJB] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=4664529&i=1>]
> Gesendet: Montag, 5. August 2013 11:52
> An: Thomas Schuler
> Betreff: Re: Fired calendar trigger still available
>
> it is removed only if there is no "next timeout" set. Do you have a one
> shot calendar timer?
>
> maybe you can share the timer/class/project?
>
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/8/5 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4664527&i=0>>
>
> > Hi Romain!
> >
> > Yes, I hope so. We don't manipulate the quartz tables on our own!
> >
> > We use a client to test scheduled beans.
> > The scheduled bean offers methods to
> >
> > - add a calendar job
> >
> > - get the information how often timeout of scheduled bean
> happens
> >
> > - get all available timers - it returns timerService.getTimers()
> >
> > The client adds a calendar job - checking the quartz table shows that an
> > according calendar trigger is stored.
> > Afterwards client is waiting until calendar trigger is fired - checking
> > the quartz table again shows that the calendar timer is not included any
> > more.
> > The client now asks for the available timers - what we see at this point
> > is that the fired calendar timer is still available within the collection
> > of timers (from timerService.getTimers()).
> >
> > Hope that clarifies our observation.
> >
> > Best regards,
> > Thomas
> >
> >
> > Von: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4664527&i=1>]
> > Gesendet: Montag, 5. August 2013 11:25
> > An: Thomas Schuler
> > Betreff: Re: Fired calendar trigger still available
> >
> > just to be sure to exactly get your case correctly: how is it removed
> from
> > the db? by openejb?
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/8/5 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4664525&i=0>>
> >
> > > Hi Romain!
> > >
> > > No, sorry for confusion.
> > > The problem has nothing to do with a server restart but only happens if
> > > quartz triggers are persisted.
> > >
> > > A calendar timer fires and is removed from database.
> > > But timer is still included in the collection of timers you get from
> > > timerService.getTimers() in the according scheduled bean.
> > > (If you cancel the already fired calendar timer, it is removed from the
> > > collection too.)
> > >
> > > Best regards,
> > > Thomas
> > >
> > >
> > > Von: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > [hidden email]</user/SendEmail.jtp?type=node&node=4664525&i=1>]
> > > Gesendet: Montag, 5. August 2013 10:57
> > > An: Thomas Schuler
> > > Betreff: Re: Fired calendar trigger still available
> > >
> > > you mean with persistence the timer is here when you restart right?
> > >
> > > *Romain Manni-Bucau*
> > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > http://rmannibucau.wordpress.com/>
> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > *Github: https://github.com/rmannibucau*
> > >
> > >
> > >
> > > 2013/8/5 tschuler <[hidden
> > > email]</user/SendEmail.jtp?type=node&node=4664523&i=0>>
> > >
> > > > Hi Romain!
> > > >
> > > > I have to correct me:
> > > > The calendar timer is removed after successful firing only if no
> quartz
> > > > persistence is configured.
> > > > It still happens if quartz calendar triggers are stored in a
> database.
> > > >
> > > > Best regards,
> > > > Thomas
> > > >
> > > > -----
> > > >
> > > > Hi Romain!
> > > >
> > > > As I can see you fixed both issues - am I right?
> > > > Using the TomEE 1.6.0 snapshot from today:
> > > > - the interval timer starts firing as expected
> > > > - the calendar timer is removed after successful firing
> > > >
> > > > Best regards,
> > > > Thomas
> > > >
> > > > Von: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > > [hidden email]</user/SendEmail.jtp?type=node&node=4664523&i=1>]
> > > > Gesendet: Freitag, 2. August 2013 16:38
> > > > An: Thomas Schuler
> > > > Betreff: Re: Fired calendar trigger still available
> > > >
> > > > Hi,
> > > >
> > > > about 2 it can be a "no luck" case, i commited a test case on this
> case
> > > and
> > > > updated a bit the logic, if you can test on next trunk it would be
> > great.
> > > >
> > > > *Romain Manni-Bucau*
> > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > > http://rmannibucau.wordpress.com/>
> > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > > *Github: https://github.com/rmannibucau*
> > > >
> > > >
> > > >
> > > > 2013/8/2 tschuler <[hidden
> > > > email]</user/SendEmail.jtp?type=node&node=4664498&i=0>>
> > > >
> > > > > Hi!
> > > > >
> > > > > We are doing some tests on TomEE 1.6.0 snapshot.
> > > > >
> > > > > We use a scheduled bean that gets fired by a calendar timer
> > > > > (timerService.createCalendarTimer()).
> > > > > After ejbTimeout happens, the according timer is still available
> > > > > (timerService.getTimers()).
> > > > > This is the case only if quartz persistence is activated. Might
> this
> > > be a
> > > > > potential memory leak?
> > > > >
> > > > > Another observation we made for interval timer
> > > > > (timerService.createIntervalTimer):
> > > > > It often gets fired immediately after creation. It seems that the
> > > > > initialDuration (or the first expiration date) is ignored. Once the
> > > > > immedialely firing happens, it happens for all interval timer
> created
> > > > > afterwards too.
> > > > > Quartz persistence may be activated or not - it does not make a
> > > > difference.
> > > > >
> > > > > Best regards,
> > > > > Thomas
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493.html
> > > > > Sent from the OpenEJB User mailing list archive at Nabble.com.
> > > > >
> > > >
> > > > ________________________________
> > > > If you reply to this email, your message will be added to the
> > discussion
> > > > below:
> > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493p4664498.html
> > > > To unsubscribe from Fired calendar trigger still available, click
> here<
> > > > >.
> > > > NAML<
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493p4664520.html
> > > > Sent from the OpenEJB User mailing list archive at Nabble.com.
> > > >
> > >
> > > ________________________________
> > > If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493p4664523.html
> > > To unsubscribe from Fired calendar trigger still available, click here<
> > > >.
> > > NAML<
> > >
> >
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493p4664524.html
> > > Sent from the OpenEJB User mailing list archive at Nabble.com.
> > >
> >
> > ________________________________
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493p4664525.html
> > To unsubscribe from Fired calendar trigger still available, click here<
> > >.
> > NAML<
> >
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493p4664526.html
> > Sent from the OpenEJB User mailing list archive at Nabble.com.
> >
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493p4664527.html
> To unsubscribe from Fired calendar trigger still available, click here<
> >.
> NAML<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
> timerTests.src.zip (5K) <
> http://openejb.979440.n4.nabble.com/attachment/4664528/0/timerTests.src.zip
> >
> timerTests.zip (7K) <
> http://openejb.979440.n4.nabble.com/attachment/4664528/1/timerTests.zip>
> tomee.xml (654 bytes) <
> http://openejb.979440.n4.nabble.com/attachment/4664528/2/tomee.xml>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493p4664528.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493p4664529.html
To unsubscribe from Fired calendar trigger still available, click
here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4664493&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NjQ0OTN8LTE4NTIyNTQ0OTI=>.
NAML<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context:
http://openejb.979440.n4.nabble.com/Fired-calendar-trigger-still-available-tp4664493p4664530.html
Sent from the OpenEJB User mailing list archive at Nabble.com.