You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by tschuler <th...@opentext.com> on 2012/11/05 15:53:04 UTC

Re: Use external database for persistent timer service

Hi!

I successfully configured tomee for using an external database to enable a
persistent timer service.
I tried the TimerSessionBean example within the JavaEE6 Tutorial
(http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
The quartz database tables get the job informations, but I face a problem
with programmatically added timeouts:
They don't seem to be executed, about 90 seconds after the trigger time the
following message is written to the log file:

[Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport recoverMisfiredJobs
INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
[Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
manage
SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't store
trigger
'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
org.quartz.JobPersistenceException: Couldn't store trigger
'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
exception: java.lang.NullPointerException]
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
Caused by: java.lang.NullPointerException
	at org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
	at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
	at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
	at java.util.HashMap.writeObject(HashMap.java:1001)
	at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
	at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
	at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
	at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
	at
org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
	at
org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
	at
org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
	... 5 more

Having a look into TimerData.java shows that timeoutMethod seems to be null.

What must be done to get the programmtic timeout running?

Best regards,
Thomas



--
View this message in context: http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

Hopefully it's your forename.

I'm sorry, but I never used maven before.
Would it help to provide the packed TomEE application folder and the adapted tomee.xml?

By the way: Do you know Bruno? Is he working with you on TomEE?
He contacted me directly and I just want to be sure how to treat him.

Best regards,
                Thomas

From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658382h52@n4.nabble.com]
Sent: Montag, 5. November 2012 17:49
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

Hi,

thanks for it but is it possible to share a maven project (really easier
for us to work on it since these days are really busy)

*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*




2012/11/5 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>

> Hi!
>
> Added a few files for reproducing  the problem:
> SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> example in the JavaEE6 Tutorial stripped down to the programmatically
> inserted timer.
> AddProgrammaticTimer adds the programmatic timer.
> Tomee.xml shows the datasource definition.
> Application.properties (deployed to WEB-INF directory) shows the
> definition of the used quartz scheduler.
> Tables_sqlServer.sql show the SQL script provided from Quartz to generate
> the according tables for a MSSQL database.
>
> Do you need more information?
>
> Best regards,
>         Thomas
>
> -----
>
>
>
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> Sent: Montag, 5. November 2012 16:27
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> yeah, was asking to a sample to have a look locally
>
> thks
>
> *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*
>
>
>
>
> 2012/11/5 tschuler <[hidden email]>
>
> > Hi!
> >
> > What do you mean with reproduce?
> > If you want, I can provide you a simple example that doesn't work.
> >
> > Best regards,
> >                 Thomas
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]]
> > Sent: Montag, 5. November 2012 16:18
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > Hi,
> >
> > can you reproduce it?
> >
> > normally timeoutMethod can't be null
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/5 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> >
> > > Hi!
> > >
> > > I successfully configured tomee for using an external database to
> enable
> > a
> > > persistent timer service.
> > > I tried the TimerSessionBean example within the JavaEE6 Tutorial
> > > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > > The quartz database tables get the job informations, but I face a
> problem
> > > with programmatically added timeouts:
> > > They don't seem to be executed, about 90 seconds after the trigger time
> > the
> > > following message is written to the log file:
> > >
> > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > recoverMisfiredJobs
> > > INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > > manage
> > > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't store
> > > trigger
> > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > > org.quartz.JobPersistenceException: Couldn't store trigger
> > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
> > > exception: java.lang.NullPointerException]
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > > Caused by: java.lang.NullPointerException
> > >         at
> > > org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> > >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
> > >         at
> > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > >         at
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > >         at
> > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > >         at
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > >         at
> > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > >         at java.util.HashMap.writeObject(HashMap.java:1001)
> > >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
> > >         at
> > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > >         at
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > >         at
> > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > >         at
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > >         at
> > >
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> > >         at
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> > >         at
> > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > >         at
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > >         at
> > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> > >         ... 5 more
> > >
> > > Having a look into TimerData.java shows that timeoutMethod seems to be
> > > null.
> > >
> > > What must be done to get the programmtic timeout running?
> > >
> > > Best regards,
> > > Thomas
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> > To unsubscribe from Use external database for persistent timer service,
> > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> To unsubscribe from Use external database for persistent timer service,
> click here.
> NAML
>
>
> SchedulerBeanPersisted.java (1K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> >
> SchedulerBeanPersistedRemote.java (230 bytes) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> >
> AddProgrammaticTimer.java (1K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> >
> tomee.xml (654 bytes) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> application.properties (1K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> >
> tables_sqlServer.sql (14K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> >
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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/Use-external-database-for-persistent-timer-service-tp4658321p4658387.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

No problem.
I was just wondering to get an email from gnomie
Just wanted to know the intention of the remark “vielversprechend” meaning something like “promising”.

Best regards,
                Thomas

From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658400h10@n4.nabble.com]
Sent: Dienstag, 6. November 2012 14:45
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

Hi guys,

can you switch back in english please? ;)

*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*




2012/11/6 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658400&i=0>>

> Hallo!
>
> Ich bin etwas verwirrt.
> Darf ich fragen, wer Sie sind und was Sie mit "vielversprechend" meinen?
>
> Schönen Gruß,
>                 Thomas
>
> From: gnomie [via OpenEJB] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=4658400&i=1>]
> Sent: Dienstag, 6. November 2012 14:39
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> ja, das sieht wirklich vielversprechend aus,
>
> On 11/06/2012 02:17 PM, Romain Manni-Bucau wrote:
>
> > Hi,
> >
> > yes Romain ;)
> >
> >
> > Don't know Bruno i think
> >
> > Ant is fine too, what i meant is sthg improtable in an IDE and buildable
> in
> > command line
> >
> > thks
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/6 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658395&i=0>>
> >
> >> Hi!
> >>
> >> Sorry to respond once more:
> >> I can provide you an eclipse project instead.
> >> It includes an ant task for building and deploying the example by
> copying
> >> a TomEE 1.5 installation and adapting it for executing the example.
> >> Would that help?
> >>
> >> Best regards,
> >>                  Thomas
> >>
> >> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> >> [hidden email]</user/SendEmail.jtp?type=node&node=4658395&i=1>]
> >> Sent: Montag, 5. November 2012 17:49
> >> To: Thomas Schuler
> >> Subject: Re: Use external database for persistent timer service
> >>
> >> Hi,
> >>
> >> thanks for it but is it possible to share a maven project (really easier
> >> for us to work on it since these days are really busy)
> >>
> >> *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*
> >>
> >>
> >>
> >>
> >> 2012/11/5 tschuler <[hidden
> >> email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
> >>
> >>> Hi!
> >>>
> >>> Added a few files for reproducing  the problem:
> >>> SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> >>> example in the JavaEE6 Tutorial stripped down to the programmatically
> >>> inserted timer.
> >>> AddProgrammaticTimer adds the programmatic timer.
> >>> Tomee.xml shows the datasource definition.
> >>> Application.properties (deployed to WEB-INF directory) shows the
> >>> definition of the used quartz scheduler.
> >>> Tables_sqlServer.sql show the SQL script provided from Quartz to
> generate
> >>> the according tables for a MSSQL database.
> >>>
> >>> Do you need more information?
> >>>
> >>> Best regards,
> >>>          Thomas
> >>>
> >>> -----
> >>>
> >>>
> >>>
> >>>
> >>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> >>> [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> >>> Sent: Montag, 5. November 2012 16:27
> >>> To: Thomas Schuler
> >>> Subject: Re: Use external database for persistent timer service
> >>>
> >>> yeah, was asking to a sample to have a look locally
> >>>
> >>> thks
> >>>
> >>> *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*
> >>>
> >>>
> >>>
> >>>
> >>> 2012/11/5 tschuler <[hidden email]>
> >>>
> >>>> Hi!
> >>>>
> >>>> What do you mean with reproduce?
> >>>> If you want, I can provide you a simple example that doesn't work.
> >>>>
> >>>> Best regards,
> >>>>                  Thomas
> >>>>
> >>>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> >>>> [hidden email]]
> >>>> Sent: Montag, 5. November 2012 16:18
> >>>> To: Thomas Schuler
> >>>> Subject: Re: Use external database for persistent timer service
> >>>>
> >>>> Hi,
> >>>>
> >>>> can you reproduce it?
> >>>>
> >>>> normally timeoutMethod can't be null
> >>>>
> >>>> *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*
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> 2012/11/5 tschuler <[hidden
> >>>> email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> >>>>
> >>>>> Hi!
> >>>>>
> >>>>> I successfully configured tomee for using an external database to
> >>> enable
> >>>> a
> >>>>> persistent timer service.
> >>>>> I tried the TimerSessionBean example within the JavaEE6 Tutorial
> >>>>> (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> >>>>> The quartz database tables get the job informations, but I face a
> >>> problem
> >>>>> with programmatically added timeouts:
> >>>>> They don't seem to be executed, about 90 seconds after the trigger
> >> time
> >>>> the
> >>>>> following message is written to the log file:
> >>>>>
> >>>>> [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> >>>>> recoverMisfiredJobs
> >>>>> INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> >>>>> [Timestamp]
> >> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> >>>>> manage
> >>>>> SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't
> >> store
> >>>>> trigger
> >>>>>
> >>>>>
> >>
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> >>>>> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> >>>>> org.quartz.JobPersistenceException: Couldn't store trigger
> >>>>>
> >>>>>
> >>
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> >>>>> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
> >>>>> exception: java.lang.NullPointerException]
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> >>>>> Caused by: java.lang.NullPointerException
> >>>>>          at
> >>>>>
> >> org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> >>>>>          at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
> >> Source)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>>>>          at java.lang.reflect.Method.invoke(Method.java:597)
> >>>>>          at
> >>>>>
> >> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> >>>>>          at
> >>>>>
> >>>
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> >>>>>          at
> >>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> >>>>>          at
> >>>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> >>>>>          at java.util.HashMap.writeObject(HashMap.java:1001)
> >>>>>          at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
> >> Source)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>>>>          at java.lang.reflect.Method.invoke(Method.java:597)
> >>>>>          at
> >>>>>
> >> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> >>>>>          at
> >>>>>
> >>>
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> >>>>>          at
> >>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> >>>>>          at
> >>>>>
> >>
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> >>>>>          at
> >>>>>
> >>>
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> >>>>>          at
> >>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> >>>>>          at
> >>>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> >>>>>          ... 5 more
> >>>>>
> >>>>> Having a look into TimerData.java shows that timeoutMethod seems to
> >> be
> >>>>> null.
> >>>>>
> >>>>> What must be done to get the programmtic timeout running?
> >>>>>
> >>>>> Best regards,
> >>>>> Thomas
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> View this message in context:
> >>>>>
> >>
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> >>>> To unsubscribe from Use external database for persistent timer
> service,
> >>>> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> >>> To unsubscribe from Use external database for persistent timer service,
> >>> click here.
> >>> NAML
> >>>
> >>>
> >>> SchedulerBeanPersisted.java (1K) <
> >>>
> >>
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> >>> SchedulerBeanPersistedRemote.java (230 bytes) <
> >>>
> >>
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> >>> AddProgrammaticTimer.java (1K) <
> >>>
> >>
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> >>> tomee.xml (654 bytes) <
> >>> http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> >>> application.properties (1K) <
> >>>
> >>
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> >>> tables_sqlServer.sql (14K) <
> >>>
> >>
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> >>
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
> >> To unsubscribe from Use external database for persistent timer service,
> >> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.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/Use-external-database-for-persistent-timer-service-tp4658321p4658395.html
> To unsubscribe from Use external database for persistent timer service,
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658396.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/Use-external-database-for-persistent-timer-service-tp4658321p4658400.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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/Use-external-database-for-persistent-timer-service-tp4658321p4658402.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi guys,

can you switch back in english please? ;)

*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*




2012/11/6 tschuler <th...@opentext.com>

> Hallo!
>
> Ich bin etwas verwirrt.
> Darf ich fragen, wer Sie sind und was Sie mit "vielversprechend" meinen?
>
> Schönen Gruß,
>                 Thomas
>
> From: gnomie [via OpenEJB] [mailto:
> ml-node+s979440n4658395h55@n4.nabble.com]
> Sent: Dienstag, 6. November 2012 14:39
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> ja, das sieht wirklich vielversprechend aus,
>
> On 11/06/2012 02:17 PM, Romain Manni-Bucau wrote:
>
> > Hi,
> >
> > yes Romain ;)
> >
> >
> > Don't know Bruno i think
> >
> > Ant is fine too, what i meant is sthg improtable in an IDE and buildable
> in
> > command line
> >
> > thks
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/6 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658395&i=0>>
> >
> >> Hi!
> >>
> >> Sorry to respond once more:
> >> I can provide you an eclipse project instead.
> >> It includes an ant task for building and deploying the example by
> copying
> >> a TomEE 1.5 installation and adapting it for executing the example.
> >> Would that help?
> >>
> >> Best regards,
> >>                  Thomas
> >>
> >> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> >> [hidden email]</user/SendEmail.jtp?type=node&node=4658395&i=1>]
> >> Sent: Montag, 5. November 2012 17:49
> >> To: Thomas Schuler
> >> Subject: Re: Use external database for persistent timer service
> >>
> >> Hi,
> >>
> >> thanks for it but is it possible to share a maven project (really easier
> >> for us to work on it since these days are really busy)
> >>
> >> *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*
> >>
> >>
> >>
> >>
> >> 2012/11/5 tschuler <[hidden
> >> email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
> >>
> >>> Hi!
> >>>
> >>> Added a few files for reproducing  the problem:
> >>> SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> >>> example in the JavaEE6 Tutorial stripped down to the programmatically
> >>> inserted timer.
> >>> AddProgrammaticTimer adds the programmatic timer.
> >>> Tomee.xml shows the datasource definition.
> >>> Application.properties (deployed to WEB-INF directory) shows the
> >>> definition of the used quartz scheduler.
> >>> Tables_sqlServer.sql show the SQL script provided from Quartz to
> generate
> >>> the according tables for a MSSQL database.
> >>>
> >>> Do you need more information?
> >>>
> >>> Best regards,
> >>>          Thomas
> >>>
> >>> -----
> >>>
> >>>
> >>>
> >>>
> >>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> >>> [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> >>> Sent: Montag, 5. November 2012 16:27
> >>> To: Thomas Schuler
> >>> Subject: Re: Use external database for persistent timer service
> >>>
> >>> yeah, was asking to a sample to have a look locally
> >>>
> >>> thks
> >>>
> >>> *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*
> >>>
> >>>
> >>>
> >>>
> >>> 2012/11/5 tschuler <[hidden email]>
> >>>
> >>>> Hi!
> >>>>
> >>>> What do you mean with reproduce?
> >>>> If you want, I can provide you a simple example that doesn't work.
> >>>>
> >>>> Best regards,
> >>>>                  Thomas
> >>>>
> >>>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> >>>> [hidden email]]
> >>>> Sent: Montag, 5. November 2012 16:18
> >>>> To: Thomas Schuler
> >>>> Subject: Re: Use external database for persistent timer service
> >>>>
> >>>> Hi,
> >>>>
> >>>> can you reproduce it?
> >>>>
> >>>> normally timeoutMethod can't be null
> >>>>
> >>>> *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*
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> 2012/11/5 tschuler <[hidden
> >>>> email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> >>>>
> >>>>> Hi!
> >>>>>
> >>>>> I successfully configured tomee for using an external database to
> >>> enable
> >>>> a
> >>>>> persistent timer service.
> >>>>> I tried the TimerSessionBean example within the JavaEE6 Tutorial
> >>>>> (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> >>>>> The quartz database tables get the job informations, but I face a
> >>> problem
> >>>>> with programmatically added timeouts:
> >>>>> They don't seem to be executed, about 90 seconds after the trigger
> >> time
> >>>> the
> >>>>> following message is written to the log file:
> >>>>>
> >>>>> [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> >>>>> recoverMisfiredJobs
> >>>>> INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> >>>>> [Timestamp]
> >> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> >>>>> manage
> >>>>> SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't
> >> store
> >>>>> trigger
> >>>>>
> >>>>>
> >>
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> >>>>> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> >>>>> org.quartz.JobPersistenceException: Couldn't store trigger
> >>>>>
> >>>>>
> >>
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> >>>>> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
> >>>>> exception: java.lang.NullPointerException]
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> >>>>> Caused by: java.lang.NullPointerException
> >>>>>          at
> >>>>>
> >> org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> >>>>>          at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
> >> Source)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>>>>          at java.lang.reflect.Method.invoke(Method.java:597)
> >>>>>          at
> >>>>>
> >> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> >>>>>          at
> >>>>>
> >>>
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> >>>>>          at
> >>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> >>>>>          at
> >>>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> >>>>>          at java.util.HashMap.writeObject(HashMap.java:1001)
> >>>>>          at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
> >> Source)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>>>>          at java.lang.reflect.Method.invoke(Method.java:597)
> >>>>>          at
> >>>>>
> >> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> >>>>>          at
> >>>>>
> >>>
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> >>>>>          at
> >>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> >>>>>          at
> >>>>>
> >>
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> >>>>>          at
> >>>>>
> >>>
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> >>>>>          at
> >>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> >>>>>          at
> >>>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> >>>>>          at
> >>>>>
> >>>>>
> >>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> >>>>>          ... 5 more
> >>>>>
> >>>>> Having a look into TimerData.java shows that timeoutMethod seems to
> >> be
> >>>>> null.
> >>>>>
> >>>>> What must be done to get the programmtic timeout running?
> >>>>>
> >>>>> Best regards,
> >>>>> Thomas
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> View this message in context:
> >>>>>
> >>
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> >>>> To unsubscribe from Use external database for persistent timer
> service,
> >>>> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> >>> To unsubscribe from Use external database for persistent timer service,
> >>> click here.
> >>> NAML
> >>>
> >>>
> >>> SchedulerBeanPersisted.java (1K) <
> >>>
> >>
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> >>> SchedulerBeanPersistedRemote.java (230 bytes) <
> >>>
> >>
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> >>> AddProgrammaticTimer.java (1K) <
> >>>
> >>
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> >>> tomee.xml (654 bytes) <
> >>> http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> >>> application.properties (1K) <
> >>>
> >>
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> >>> tables_sqlServer.sql (14K) <
> >>>
> >>
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> >>
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
> >> To unsubscribe from Use external database for persistent timer service,
> >> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.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/Use-external-database-for-persistent-timer-service-tp4658321p4658395.html
> To unsubscribe from Use external database for persistent timer service,
> click here<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
> >.
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658396.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hallo!

Ich bin etwas verwirrt.
Darf ich fragen, wer Sie sind und was Sie mit "vielversprechend" meinen?

Schönen Gruß,
                Thomas

From: gnomie [via OpenEJB] [mailto:ml-node+s979440n4658395h55@n4.nabble.com]
Sent: Dienstag, 6. November 2012 14:39
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

ja, das sieht wirklich vielversprechend aus,

On 11/06/2012 02:17 PM, Romain Manni-Bucau wrote:

> Hi,
>
> yes Romain ;)
>
>
> Don't know Bruno i think
>
> Ant is fine too, what i meant is sthg improtable in an IDE and buildable in
> command line
>
> thks
>
> *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*
>
>
>
>
> 2012/11/6 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658395&i=0>>
>
>> Hi!
>>
>> Sorry to respond once more:
>> I can provide you an eclipse project instead.
>> It includes an ant task for building and deploying the example by copying
>> a TomEE 1.5 installation and adapting it for executing the example.
>> Would that help?
>>
>> Best regards,
>>                  Thomas
>>
>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
>> [hidden email]</user/SendEmail.jtp?type=node&node=4658395&i=1>]
>> Sent: Montag, 5. November 2012 17:49
>> To: Thomas Schuler
>> Subject: Re: Use external database for persistent timer service
>>
>> Hi,
>>
>> thanks for it but is it possible to share a maven project (really easier
>> for us to work on it since these days are really busy)
>>
>> *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*
>>
>>
>>
>>
>> 2012/11/5 tschuler <[hidden
>> email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
>>
>>> Hi!
>>>
>>> Added a few files for reproducing  the problem:
>>> SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
>>> example in the JavaEE6 Tutorial stripped down to the programmatically
>>> inserted timer.
>>> AddProgrammaticTimer adds the programmatic timer.
>>> Tomee.xml shows the datasource definition.
>>> Application.properties (deployed to WEB-INF directory) shows the
>>> definition of the used quartz scheduler.
>>> Tables_sqlServer.sql show the SQL script provided from Quartz to generate
>>> the according tables for a MSSQL database.
>>>
>>> Do you need more information?
>>>
>>> Best regards,
>>>          Thomas
>>>
>>> -----
>>>
>>>
>>>
>>>
>>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
>>> [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
>>> Sent: Montag, 5. November 2012 16:27
>>> To: Thomas Schuler
>>> Subject: Re: Use external database for persistent timer service
>>>
>>> yeah, was asking to a sample to have a look locally
>>>
>>> thks
>>>
>>> *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*
>>>
>>>
>>>
>>>
>>> 2012/11/5 tschuler <[hidden email]>
>>>
>>>> Hi!
>>>>
>>>> What do you mean with reproduce?
>>>> If you want, I can provide you a simple example that doesn't work.
>>>>
>>>> Best regards,
>>>>                  Thomas
>>>>
>>>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
>>>> [hidden email]]
>>>> Sent: Montag, 5. November 2012 16:18
>>>> To: Thomas Schuler
>>>> Subject: Re: Use external database for persistent timer service
>>>>
>>>> Hi,
>>>>
>>>> can you reproduce it?
>>>>
>>>> normally timeoutMethod can't be null
>>>>
>>>> *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*
>>>>
>>>>
>>>>
>>>>
>>>> 2012/11/5 tschuler <[hidden
>>>> email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
>>>>
>>>>> Hi!
>>>>>
>>>>> I successfully configured tomee for using an external database to
>>> enable
>>>> a
>>>>> persistent timer service.
>>>>> I tried the TimerSessionBean example within the JavaEE6 Tutorial
>>>>> (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
>>>>> The quartz database tables get the job informations, but I face a
>>> problem
>>>>> with programmatically added timeouts:
>>>>> They don't seem to be executed, about 90 seconds after the trigger
>> time
>>>> the
>>>>> following message is written to the log file:
>>>>>
>>>>> [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
>>>>> recoverMisfiredJobs
>>>>> INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
>>>>> [Timestamp]
>> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
>>>>> manage
>>>>> SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't
>> store
>>>>> trigger
>>>>>
>>>>>
>> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
>>>>> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
>>>>> org.quartz.JobPersistenceException: Couldn't store trigger
>>>>>
>>>>>
>> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
>>>>> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
>>>>> exception: java.lang.NullPointerException]
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
>>>>> Caused by: java.lang.NullPointerException
>>>>>          at
>>>>>
>> org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
>>>>>          at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
>> Source)
>>>>>          at
>>>>>
>>>>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>          at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>          at
>>>>>
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>>>>>          at
>>>>>
>>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
>>>>>          at
>>>>>
>>>>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>>>>>          at
>>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>>>>>          at
>>>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
>>>>>          at java.util.HashMap.writeObject(HashMap.java:1001)
>>>>>          at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
>> Source)
>>>>>          at
>>>>>
>>>>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>          at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>          at
>>>>>
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>>>>>          at
>>>>>
>>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
>>>>>          at
>>>>>
>>>>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>>>>>          at
>>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>>>>>          at
>>>>>
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
>>>>>          at
>>>>>
>>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
>>>>>          at
>>>>>
>>>>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>>>>>          at
>>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>>>>>          at
>>>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
>>>>>          ... 5 more
>>>>>
>>>>> Having a look into TimerData.java shows that timeoutMethod seems to
>> be
>>>>> null.
>>>>>
>>>>> What must be done to get the programmtic timeout running?
>>>>>
>>>>> Best regards,
>>>>> Thomas
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
>>>> To unsubscribe from Use external database for persistent timer service,
>>>> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
>>> To unsubscribe from Use external database for persistent timer service,
>>> click here.
>>> NAML
>>>
>>>
>>> SchedulerBeanPersisted.java (1K) <
>>>
>> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
>>> SchedulerBeanPersistedRemote.java (230 bytes) <
>>>
>> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
>>> AddProgrammaticTimer.java (1K) <
>>>
>> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
>>> tomee.xml (654 bytes) <
>>> http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
>>> application.properties (1K) <
>>>
>> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
>>> tables_sqlServer.sql (14K) <
>>>
>> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>>
>> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
>> To unsubscribe from Use external database for persistent timer service,
>> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.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/Use-external-database-for-persistent-timer-service-tp4658321p4658395.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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/Use-external-database-for-persistent-timer-service-tp4658321p4658396.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
i didn't look it in details (throw new TooMuchWorkException() ;)) but
quartz as a properties option to serialize properties and not the object
directly, maybe it is sthg to have a look

*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*




2012/11/15 tschuler <th...@opentext.com>

> Hi Romain!
>
> It’s also my opinion, but I cannot image a way to serialize any java
> object in a java independent way.
> And quartz will not change the JobData map for, e.g. only allowing String
> key-value-pairs.
>
> But if TomEE is aware of the problem and keeps it in mind if changes are
> done for the serialized objects is enough for me right now.
>
> Thanks a lot for the clarifications,
>                 Thomas
>
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658608h58@n4.nabble.com]
> Sent: Mittwoch, 14. November 2012 17:21
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> it is more or less what is done today, EjbTimerServiceImpl etc are
> serialized with the miminum of data saved (and their types are string
> etc...) but you can't see it in the database.
>
> The point is even if you respect it updating versions can break it.
>
> The only way to be sure the update is free is:
> 1) serialize the data as something not java dependent (here i think we
> should ask quartz)
> 2) manage missing attributes in the code when addind one
>
> We (TomEE) can manage 2 but i'd prefer to let quartz manage 1 since it is
> not directly TomEE related and other quartz usages can benefit from it
>
> wdyt?
>
> *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*
>
>
>
>
> 2012/11/14 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658608&i=0>>
>
> > Hi Romain!
> >
> > Yes, quartz is responsible for the serialization.
> > The JobData that is serialized into the database is simply a map.
> > The data included in the map is set by the application – in your case
> > TomEE is doing it.
> > It mainly includes:
> > - EJB_TIMERS_SERVICE - an object of type
> > org.apache.openejb.core.timer.EjbTimerServiceImpl
> > - TIMER_DATA - an object of type org.apache.openejb.core.timer.TimerData
> > These are objects put to the JobData in
> > org.apache.openejb.core.timer.EjbTimerServiceImpl.schedule(TimerData
> > timerData).
> >
> > What I am concerned about is that a timer added with e.g. TomEE 1.5.0
> > cannot be executed within TomEE 1.5.1 because the deserialization fails.
> > To my way of thinking, it would be better to add only the relevant data
> as
> > simple data types (String, Integer, ...) to the JobData.
> > That would allow changes to the EjbTimerServiceImpl (or TimerData)
> > implementation without getting into incompatibility problems because of
> > deserialization issues within persisted timers added by a former TomEE
> > version.
> >
> > Best regards,
> >         Thomas
> >
> > -----
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4658608&i=1>]
> > Sent: Samstag, 10. November 2012 10:44
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > about serialization stuff: it is completely managed by quartz
> > (org.quartz.impl.jdbcjobstore.StdJDBCDelegate  and all its children - one
> > by database type)
> >
> > we could recreate the hierarchy  (you too normally configuring quartz to
> > use the context classloader and since you have not to be so generic as us
> > you can simply override serialization method in a single class) but IMO
> if
> > this need is relevant for you it should be pushed to quartz itself, wdyt?
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/9 Romain Manni-Bucau <[hidden email]>
> >
> > > I pushed some stuff yesterday about 2 (well can be linked even if not
> > > direct) so it should be in the snapshot
> > > Le 9 nov. 2012 13:16, "tschuler" <[hidden email]> a écrit :
> > >
> > >  Hi Romain!
> > >>
> > >> About 1: It may be a config issue, but I don't think so - doesn't
> matter
> > >> right now.
> > >> About 2: If you have a solution for it, please let me know. Would be
> > >> included in a future snapshot, I think?
> > >> About 3: We need to be sure that timer issues using e.g. the actual
> > TomEE
> > >> version can be executed using the next TomEE version.
> > >>                As there are serialized OpenEJB classes in the quartz
> > >> database, they may be incompatible with the class definition included
> > in a
> > >> future TomEE version.
> > >>
> > >> Best regards,
> > >>                 Thomas
> > >>
> > >>
> > >> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > >> [hidden email]]
> > >> Sent: Donnerstag, 8. November 2012 22:38
> > >> To: Thomas Schuler
> > >> Subject: Re: Use external database for persistent timer service
> > >>
> > >> about 1: maybe just a quartz config
> > >> about 2: looking into it, think i got why but thinking to the best
> > >> solution*
> > >> about 3: we can store it as we want. That said not sure it'd be used,
> if
> > >> you change your tomee instance you often reset some datas (and i think
> > >> these timers can be resetted in such a case, no?)
> > >>
> > >> *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*
> > >>
> > >>
> > >>
> > >>
> > >> 2012/11/8 tschuler <[hidden
> > >> email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>
> > >>
> > >> > Hi!
> > >> >
> > >> > I tried todays snapshot and it worked better if TomEE is running all
> > the
> > >> > time.
> > >> > But in case of TomEE restart a few errors happen for persisted
> timers.
> > >> >
> > >> > 1) automatic timeout:
> > >> >     It takes two minutes until the timer fires again
> > >> >
> > >> >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina
> start
> > >> >         INFO: Server startup in 2357 ms
> > >> >         08.11.2012 14:29:45
> > org.quartz.impl.jdbcjobstore.JobStoreSupport
> > >> > logWarnIfNonZero
> > >> >         INFO: ClusterManager: detected 1 failed or restarted
> > instances.
> > >> >         08.11.2012 14:29:45
> > org.quartz.impl.jdbcjobstore.JobStoreSupport
> > >> > clusterRecover
> > >> >         INFO: ClusterManager: Scanning for instance
> > >> > "DE064071352380642408"'s
> > >> > failed in-progress jobs.
> > >> >         08.11.2012 14:29:45
> > org.quartz.impl.jdbcjobstore.JobStoreSupport
> > >> > logWarnIfNonZero
> > >> >         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
> > >> >         08.11.2012 14:30:45
> > org.quartz.impl.jdbcjobstore.JobStoreSupport
> > >> > recoverMisfiredJobs
> > >> >         INFO: Handling 1 trigger(s) that missed their scheduled
> > >> fire-time.
> > >> >         08.11.2012 14:30:45
> > timerPersisted.server.SchedulerBeanAutomated
> > >> > automaticTimeout
> > >> >         INFO: Automatic timeout occured
> > >> >
> > >> > 2) automatic and programmatic timeouts:
> > >> >     TomEE kill prevented the execution of five programmatic
> timeouts,
> > >> while
> > >> > server restart the first programmatic timeout causes an error and is
> > >> never
> > >> > executed
> > >> >
> > >> >         INFO: OpenWebBeans Container has started, it took 10 ms.
> > >> >         08.11.2012 16:59:02
> > >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> > >> >         org.apache.openejb.OpenEJBException: Deployment does not
> exist
> > >> in
> > >> > this container. Deployment(id='SchedulerBeanPersisted'),
> > >> Container(id='My
> > >> > Singleton Container')
> > >> >                 at
> > >> >
> > >> >
> > >>
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> > >> >                 at
> > >> >
> > >> >
> > >>
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> > >> >                 at
> > >> >
> > >>
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> > >> >                 at
> > org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> > >> >                 at
> > >> >
> > >> >
> > >>
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> > >> >         08.11.2012 16:59:02
> > >> org.apache.openejb.assembler.classic.Assembler
> > >> > createApplication
> > >> >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
> > >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> > >> >         08.11.2012 16:59:02
> > >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> > >> >         org.apache.openejb.OpenEJBException: Deployment does not
> exist
> > >> in
> > >> > this container. Deployment(id='SchedulerBeanPersisted'),
> > >> Container(id='My
> > >> > Singleton Container')
> > >> >                 at
> > >> >
> > >> >
> > >>
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> > >> >                 at
> > >> >
> > >> >
> > >>
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> > >> >                 at
> > >> >
> > >>
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> > >> >                 at
> > org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> > >> >                 at
> > >> >
> > >> >
> > >>
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> > >> >         08.11.2012 16:59:02
> > >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> > >> >         org.apache.openejb.OpenEJBException: Deployment does not
> exist
> > >> in
> > >> > this container. Deployment(id='SchedulerBeanPersisted'),
> > >> Container(id='My
> > >> > Singleton Container')
> > >> >                 at
> > >> >
> > >> >
> > >>
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> > >> >                 at
> > >> >
> > >> >
> > >>
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> > >> >                 at
> > >> >
> > >>
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> > >> >                 at
> > org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> > >> >                 at
> > >> >
> > >> >
> > >>
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> > >> >         08.11.2012 16:59:02
> > >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >> >         WARNUNG: Failed to execute ejbTimeout on
> > SchedulerBeanPersisted
> > >> > successfully within 1 attempts
> > >> >         08.11.2012 16:59:02
> > >> org.apache.openejb.assembler.classic.Assembler
> > >> > createApplication
> > >> >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
> > >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> > >> >         08.11.2012 16:59:02
> > >> org.apache.openejb.assembler.classic.Assembler
> > >> > createApplication
> > >> >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
> > >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> > >> >         08.11.2012 16:59:02
> > >> org.apache.openejb.assembler.classic.Assembler
> > >> > createApplication
> > >> >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
> > >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> > >> >         08.11.2012 16:59:02
> > >> org.apache.openejb.assembler.classic.Assembler
> > >> > createApplication
> > >> >         INFO: Deployed
> > >> >
> > >> >
> > >>
> >
> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
> > >> >         08.11.2012 16:59:02
> > timerPersisted.server.SchedulerBeanPersisted
> > >> > programmaticTimeout
> > >> >         INFO: Programmatic timeout occurred.
> > >> >
> > >> > 3) Having a look into the quartz database tables, I can see that
> > >> JOB_DATA
> > >> > column of table QRTZ_TRIGGERS includes the, let me call it timer
> > >> context.
> > >> >     This timer context includes serialized objects.
> > >> >     What I am wondering about is how you can garantee that the timer
> > >> events
> > >> > can be executed with an updated TomEE version that may include an
> > >> update of
> > >> > the serialzed objects?
> > >> >
> > >> > Best regards,
> > >> > Thomas
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > View this message in context:
> > >> >
> > >>
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
> > >> To unsubscribe from Use external database for persistent timer
> service,
> > >> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.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/Use-external-database-for-persistent-timer-service-tp4658321p4658507.html
> > To unsubscribe from Use external database for persistent timer service,
> > click here.
> > NAML
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658607.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/Use-external-database-for-persistent-timer-service-tp4658321p4658608.html
> To unsubscribe from Use external database for persistent timer service,
> click here<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
> >.
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658621.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

It’s also my opinion, but I cannot image a way to serialize any java object in a java independent way.
And quartz will not change the JobData map for, e.g. only allowing String key-value-pairs.

But if TomEE is aware of the problem and keeps it in mind if changes are done for the serialized objects is enough for me right now.

Thanks a lot for the clarifications,
                Thomas


From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658608h58@n4.nabble.com]
Sent: Mittwoch, 14. November 2012 17:21
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

it is more or less what is done today, EjbTimerServiceImpl etc are
serialized with the miminum of data saved (and their types are string
etc...) but you can't see it in the database.

The point is even if you respect it updating versions can break it.

The only way to be sure the update is free is:
1) serialize the data as something not java dependent (here i think we
should ask quartz)
2) manage missing attributes in the code when addind one

We (TomEE) can manage 2 but i'd prefer to let quartz manage 1 since it is
not directly TomEE related and other quartz usages can benefit from it

wdyt?

*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*




2012/11/14 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658608&i=0>>

> Hi Romain!
>
> Yes, quartz is responsible for the serialization.
> The JobData that is serialized into the database is simply a map.
> The data included in the map is set by the application – in your case
> TomEE is doing it.
> It mainly includes:
> - EJB_TIMERS_SERVICE - an object of type
> org.apache.openejb.core.timer.EjbTimerServiceImpl
> - TIMER_DATA - an object of type org.apache.openejb.core.timer.TimerData
> These are objects put to the JobData in
> org.apache.openejb.core.timer.EjbTimerServiceImpl.schedule(TimerData
> timerData).
>
> What I am concerned about is that a timer added with e.g. TomEE 1.5.0
> cannot be executed within TomEE 1.5.1 because the deserialization fails.
> To my way of thinking, it would be better to add only the relevant data as
> simple data types (String, Integer, ...) to the JobData.
> That would allow changes to the EjbTimerServiceImpl (or TimerData)
> implementation without getting into incompatibility problems because of
> deserialization issues within persisted timers added by a former TomEE
> version.
>
> Best regards,
>         Thomas
>
> -----
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=4658608&i=1>]
> Sent: Samstag, 10. November 2012 10:44
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> about serialization stuff: it is completely managed by quartz
> (org.quartz.impl.jdbcjobstore.StdJDBCDelegate  and all its children - one
> by database type)
>
> we could recreate the hierarchy  (you too normally configuring quartz to
> use the context classloader and since you have not to be so generic as us
> you can simply override serialization method in a single class) but IMO if
> this need is relevant for you it should be pushed to quartz itself, wdyt?
>
> *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*
>
>
>
>
> 2012/11/9 Romain Manni-Bucau <[hidden email]>
>
> > I pushed some stuff yesterday about 2 (well can be linked even if not
> > direct) so it should be in the snapshot
> > Le 9 nov. 2012 13:16, "tschuler" <[hidden email]> a écrit :
> >
> >  Hi Romain!
> >>
> >> About 1: It may be a config issue, but I don't think so - doesn't matter
> >> right now.
> >> About 2: If you have a solution for it, please let me know. Would be
> >> included in a future snapshot, I think?
> >> About 3: We need to be sure that timer issues using e.g. the actual
> TomEE
> >> version can be executed using the next TomEE version.
> >>                As there are serialized OpenEJB classes in the quartz
> >> database, they may be incompatible with the class definition included
> in a
> >> future TomEE version.
> >>
> >> Best regards,
> >>                 Thomas
> >>
> >>
> >> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> >> [hidden email]]
> >> Sent: Donnerstag, 8. November 2012 22:38
> >> To: Thomas Schuler
> >> Subject: Re: Use external database for persistent timer service
> >>
> >> about 1: maybe just a quartz config
> >> about 2: looking into it, think i got why but thinking to the best
> >> solution*
> >> about 3: we can store it as we want. That said not sure it'd be used, if
> >> you change your tomee instance you often reset some datas (and i think
> >> these timers can be resetted in such a case, no?)
> >>
> >> *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*
> >>
> >>
> >>
> >>
> >> 2012/11/8 tschuler <[hidden
> >> email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>
> >>
> >> > Hi!
> >> >
> >> > I tried todays snapshot and it worked better if TomEE is running all
> the
> >> > time.
> >> > But in case of TomEE restart a few errors happen for persisted timers.
> >> >
> >> > 1) automatic timeout:
> >> >     It takes two minutes until the timer fires again
> >> >
> >> >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start
> >> >         INFO: Server startup in 2357 ms
> >> >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> > logWarnIfNonZero
> >> >         INFO: ClusterManager: detected 1 failed or restarted
> instances.
> >> >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> > clusterRecover
> >> >         INFO: ClusterManager: Scanning for instance
> >> > "DE064071352380642408"'s
> >> > failed in-progress jobs.
> >> >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> > logWarnIfNonZero
> >> >         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
> >> >         08.11.2012 14:30:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> > recoverMisfiredJobs
> >> >         INFO: Handling 1 trigger(s) that missed their scheduled
> >> fire-time.
> >> >         08.11.2012 14:30:45
> timerPersisted.server.SchedulerBeanAutomated
> >> > automaticTimeout
> >> >         INFO: Automatic timeout occured
> >> >
> >> > 2) automatic and programmatic timeouts:
> >> >     TomEE kill prevented the execution of five programmatic timeouts,
> >> while
> >> > server restart the first programmatic timeout causes an error and is
> >> never
> >> > executed
> >> >
> >> >         INFO: OpenWebBeans Container has started, it took 10 ms.
> >> >         08.11.2012 16:59:02
> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >> >         org.apache.openejb.OpenEJBException: Deployment does not exist
> >> in
> >> > this container. Deployment(id='SchedulerBeanPersisted'),
> >> Container(id='My
> >> > Singleton Container')
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >> >                 at
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >> >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >> >                 at
> >> >
> >> >
> >>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >> >         08.11.2012 16:59:02
> >> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
> >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> >> >         08.11.2012 16:59:02
> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >> >         org.apache.openejb.OpenEJBException: Deployment does not exist
> >> in
> >> > this container. Deployment(id='SchedulerBeanPersisted'),
> >> Container(id='My
> >> > Singleton Container')
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >> >                 at
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >> >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >> >                 at
> >> >
> >> >
> >>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >> >         08.11.2012 16:59:02
> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >> >         org.apache.openejb.OpenEJBException: Deployment does not exist
> >> in
> >> > this container. Deployment(id='SchedulerBeanPersisted'),
> >> Container(id='My
> >> > Singleton Container')
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >> >                 at
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >> >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >> >                 at
> >> >
> >> >
> >>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >> >         08.11.2012 16:59:02
> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >         WARNUNG: Failed to execute ejbTimeout on
> SchedulerBeanPersisted
> >> > successfully within 1 attempts
> >> >         08.11.2012 16:59:02
> >> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
> >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> >> >         08.11.2012 16:59:02
> >> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
> >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> >> >         08.11.2012 16:59:02
> >> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
> >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> >> >         08.11.2012 16:59:02
> >> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> >         INFO: Deployed
> >> >
> >> >
> >>
> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
> >> >         08.11.2012 16:59:02
> timerPersisted.server.SchedulerBeanPersisted
> >> > programmaticTimeout
> >> >         INFO: Programmatic timeout occurred.
> >> >
> >> > 3) Having a look into the quartz database tables, I can see that
> >> JOB_DATA
> >> > column of table QRTZ_TRIGGERS includes the, let me call it timer
> >> context.
> >> >     This timer context includes serialized objects.
> >> >     What I am wondering about is how you can garantee that the timer
> >> events
> >> > can be executed with an updated TomEE version that may include an
> >> update of
> >> > the serialzed objects?
> >> >
> >> > Best regards,
> >> > Thomas
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >> >
> >>
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
> >> To unsubscribe from Use external database for persistent timer service,
> >> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.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/Use-external-database-for-persistent-timer-service-tp4658321p4658507.html
> To unsubscribe from Use external database for persistent timer service,
> click here.
> NAML
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658607.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/Use-external-database-for-persistent-timer-service-tp4658321p4658608.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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/Use-external-database-for-persistent-timer-service-tp4658321p4658621.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

regarding the 2mn latency i'm not sure but since i didnt reprouce it
locally i can't really say...would be nice to reproduce it in a test (can
probably be done playing with some jdbc inserts + EjbTimerService) but i
don't have enough time currently

about the release, JL started the process today (for the 1.5.1) so it
should be out next week i think

*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*




2012/11/15 tschuler <th...@opentext.com>

> Hi Romain!
>
> Great work.
> It looks much better now.
> The programmatic timer is working as expected – even if a server startup
> is done in the meanwhile.
>
> The automatic timer is also working but shows a strange behavior while
> server startup:
> 1) If no programmatic timer is available
>    -> automatic timer is executed two minutes after TomEE startup!
> 2) If a programmatic timer is defined and its trigger timestamp has not
> passed while TomEE was down
>    -> programmatic timer is triggered correctly, but automatic timer is
> executed two minutes after TomEE startup!
> 3) If a programmatic timer is defined and its trigger timestamp has passed
> while TomEE was down
>    -> programmatic timer is triggered while TomEE startup (as expected),
> the automatic timer is also executed immediately after TomEE startup (as
> expected)!
>
> But the most important improvement: The server starts in any case, no
> timer events are lost and no need to recreate the quartz tables any more.
>
> I know, you think quartz is responsible for the two minutes delay in 1) &
> 2) before automatic timer starts to fire.
> But I don't think so because of the behavior in 3) where the automatic
> timer starts to fire immediately after TomEE startup.
>
> Just for curiosity:
> Will the changes be integrated into a patch for TomEE 1.5.0 or only be
> available with TomEE 1.5.1?
> Do you already know when TomEE 1.5.1 will be available?
>
> Best regards,
>         Thomas
>
> -----
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658611h51@n4.nabble.com]
> Sent: Mittwoch, 14. November 2012 18:40
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> just commited some change about it,
>
> if you can test with tmr snapshot it would be wonderful
>
> *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*
>
>
>
>
> 2012/11/14 Romain Manni-Bucau <[hidden email]>
>
> > it is more or less what is done today, EjbTimerServiceImpl etc are
> > serialized with the miminum of data saved (and their types are string
> > etc...) but you can't see it in the database.
> >
> > The point is even if you respect it updating versions can break it.
> >
> > The only way to be sure the update is free is:
> > 1) serialize the data as something not java dependent (here i think we
> > should ask quartz)
> > 2) manage missing attributes in the code when addind one
> >
> > We (TomEE) can manage 2 but i'd prefer to let quartz manage 1 since it is
> > not directly TomEE related and other quartz usages can benefit from it
> >
> > wdyt?
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/14 tschuler <[hidden email]>
> >
> >> Hi Romain!
> >>
> >> Yes, quartz is responsible for the serialization.
> >> The JobData that is serialized into the database is simply a map.
> >> The data included in the map is set by the application – in your case
> >> TomEE is doing it.
> >> It mainly includes:
> >> - EJB_TIMERS_SERVICE - an object of type
> >> org.apache.openejb.core.timer.EjbTimerServiceImpl
> >> - TIMER_DATA - an object of type org.apache.openejb.core.timer.TimerData
> >> These are objects put to the JobData in
> >> org.apache.openejb.core.timer.EjbTimerServiceImpl.schedule(TimerData
> >> timerData).
> >>
> >> What I am concerned about is that a timer added with e.g. TomEE 1.5.0
> >> cannot be executed within TomEE 1.5.1 because the deserialization fails.
> >> To my way of thinking, it would be better to add only the relevant data
> >> as simple data types (String, Integer, ...) to the JobData.
> >> That would allow changes to the EjbTimerServiceImpl (or TimerData)
> >> implementation without getting into incompatibility problems because of
> >> deserialization issues within persisted timers added by a former TomEE
> >> version.
> >>
> >> Best regards,
> >>         Thomas
> >>
> >> -----
> >>
> >> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> >> [hidden email]]
> >> Sent: Samstag, 10. November 2012 10:44
> >> To: Thomas Schuler
> >> Subject: Re: Use external database for persistent timer service
> >>
> >> about serialization stuff: it is completely managed by quartz
> >> (org.quartz.impl.jdbcjobstore.StdJDBCDelegate  and all its children -
> one
> >> by database type)
> >>
> >> we could recreate the hierarchy  (you too normally configuring quartz to
> >> use the context classloader and since you have not to be so generic as
> us
> >> you can simply override serialization method in a single class) but IMO
> if
> >> this need is relevant for you it should be pushed to quartz itself,
> wdyt?
> >>
> >> *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*
> >>
> >>
> >>
> >>
> >> 2012/11/9 Romain Manni-Bucau <[hidden email]>
> >>
> >> > I pushed some stuff yesterday about 2 (well can be linked even if not
> >> > direct) so it should be in the snapshot
> >> > Le 9 nov. 2012 13:16, "tschuler" <[hidden email]> a écrit :
> >> >
> >> >  Hi Romain!
> >> >>
> >> >> About 1: It may be a config issue, but I don't think so - doesn't
> >> matter
> >> >> right now.
> >> >> About 2: If you have a solution for it, please let me know. Would be
> >> >> included in a future snapshot, I think?
> >> >> About 3: We need to be sure that timer issues using e.g. the actual
> >> TomEE
> >> >> version can be executed using the next TomEE version.
> >> >>                As there are serialized OpenEJB classes in the quartz
> >> >> database, they may be incompatible with the class definition included
> >> in a
> >> >> future TomEE version.
> >> >>
> >> >> Best regards,
> >> >>                 Thomas
> >> >>
> >> >>
> >> >> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> >> >> [hidden email]]
> >> >> Sent: Donnerstag, 8. November 2012 22:38
> >> >> To: Thomas Schuler
> >> >> Subject: Re: Use external database for persistent timer service
> >> >>
> >> >> about 1: maybe just a quartz config
> >> >> about 2: looking into it, think i got why but thinking to the best
> >> >> solution*
> >> >> about 3: we can store it as we want. That said not sure it'd be used,
> >> if
> >> >> you change your tomee instance you often reset some datas (and i
> think
> >> >> these timers can be resetted in such a case, no?)
> >> >>
> >> >> *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*
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> 2012/11/8 tschuler <[hidden
> >> >> email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>
> >> >>
> >> >> > Hi!
> >> >> >
> >> >> > I tried todays snapshot and it worked better if TomEE is running
> all
> >> the
> >> >> > time.
> >> >> > But in case of TomEE restart a few errors happen for persisted
> >> timers.
> >> >> >
> >> >> > 1) automatic timeout:
> >> >> >     It takes two minutes until the timer fires again
> >> >> >
> >> >> >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina
> >> start
> >> >> >         INFO: Server startup in 2357 ms
> >> >> >         08.11.2012 14:29:45
> >> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> >> > logWarnIfNonZero
> >> >> >         INFO: ClusterManager: detected 1 failed or restarted
> >> instances.
> >> >> >         08.11.2012 14:29:45
> >> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> >> > clusterRecover
> >> >> >         INFO: ClusterManager: Scanning for instance
> >> >> > "DE064071352380642408"'s
> >> >> > failed in-progress jobs.
> >> >> >         08.11.2012 14:29:45
> >> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> >> > logWarnIfNonZero
> >> >> >         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
> >> >> >         08.11.2012 14:30:45
> >> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> >> > recoverMisfiredJobs
> >> >> >         INFO: Handling 1 trigger(s) that missed their scheduled
> >> >> fire-time.
> >> >> >         08.11.2012 14:30:45
> >> timerPersisted.server.SchedulerBeanAutomated
> >> >> > automaticTimeout
> >> >> >         INFO: Automatic timeout occured
> >> >> >
> >> >> > 2) automatic and programmatic timeouts:
> >> >> >     TomEE kill prevented the execution of five programmatic
> timeouts,
> >> >> while
> >> >> > server restart the first programmatic timeout causes an error and
> is
> >> >> never
> >> >> > executed
> >> >> >
> >> >> >         INFO: OpenWebBeans Container has started, it took 10 ms.
> >> >> >         08.11.2012 16:59:02
> >> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >> >         WARNUNG: Exception from ejbTimeout on
> SchedulerBeanPersisted
> >> >> >         org.apache.openejb.OpenEJBException: Deployment does not
> >> exist
> >> >> in
> >> >> > this container. Deployment(id='SchedulerBeanPersisted'),
> >> >> Container(id='My
> >> >> > Singleton Container')
> >> >> >                 at
> >> >> >
> >> >> >
> >> >>
> >>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >> >> >                 at
> >> >> >
> >> >> >
> >> >>
> >>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >> >> >                 at
> >> >> >
> >> >>
> >>
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >> >> >                 at
> >> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >> >> >                 at
> >> >> >
> >> >> >
> >> >>
> >>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >> >> >         08.11.2012 16:59:02
> >> >> org.apache.openejb.assembler.classic.Assembler
> >> >> > createApplication
> >> >> >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
> >> >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> >> >> >         08.11.2012 16:59:02
> >> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >> >         WARNUNG: Exception from ejbTimeout on
> SchedulerBeanPersisted
> >> >> >         org.apache.openejb.OpenEJBException: Deployment does not
> >> exist
> >> >> in
> >> >> > this container. Deployment(id='SchedulerBeanPersisted'),
> >> >> Container(id='My
> >> >> > Singleton Container')
> >> >> >                 at
> >> >> >
> >> >> >
> >> >>
> >>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >> >> >                 at
> >> >> >
> >> >> >
> >> >>
> >>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >> >> >                 at
> >> >> >
> >> >>
> >>
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >> >> >                 at
> >> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >> >> >                 at
> >> >> >
> >> >> >
> >> >>
> >>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >> >> >         08.11.2012 16:59:02
> >> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >> >         WARNUNG: Exception from ejbTimeout on
> SchedulerBeanPersisted
> >> >> >         org.apache.openejb.OpenEJBException: Deployment does not
> >> exist
> >> >> in
> >> >> > this container. Deployment(id='SchedulerBeanPersisted'),
> >> >> Container(id='My
> >> >> > Singleton Container')
> >> >> >                 at
> >> >> >
> >> >> >
> >> >>
> >>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >> >> >                 at
> >> >> >
> >> >> >
> >> >>
> >>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >> >> >                 at
> >> >> >
> >> >>
> >>
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >> >> >                 at
> >> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >> >> >                 at
> >> >> >
> >> >> >
> >> >>
> >>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >> >> >         08.11.2012 16:59:02
> >> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >> >         WARNUNG: Failed to execute ejbTimeout on
> >> SchedulerBeanPersisted
> >> >> > successfully within 1 attempts
> >> >> >         08.11.2012 16:59:02
> >> >> org.apache.openejb.assembler.classic.Assembler
> >> >> > createApplication
> >> >> >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
> >> >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> >> >> >         08.11.2012 16:59:02
> >> >> org.apache.openejb.assembler.classic.Assembler
> >> >> > createApplication
> >> >> >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
> >> >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> >> >> >         08.11.2012 16:59:02
> >> >> org.apache.openejb.assembler.classic.Assembler
> >> >> > createApplication
> >> >> >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
> >> >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> >> >> >         08.11.2012 16:59:02
> >> >> org.apache.openejb.assembler.classic.Assembler
> >> >> > createApplication
> >> >> >         INFO: Deployed
> >> >> >
> >> >> >
> >> >>
> >>
> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
> >> >> >         08.11.2012 16:59:02
> >> timerPersisted.server.SchedulerBeanPersisted
> >> >> > programmaticTimeout
> >> >> >         INFO: Programmatic timeout occurred.
> >> >> >
> >> >> > 3) Having a look into the quartz database tables, I can see that
> >> >> JOB_DATA
> >> >> > column of table QRTZ_TRIGGERS includes the, let me call it timer
> >> >> context.
> >> >> >     This timer context includes serialized objects.
> >> >> >     What I am wondering about is how you can garantee that the
> timer
> >> >> events
> >> >> > can be executed with an updated TomEE version that may include an
> >> >> update of
> >> >> > the serialzed objects?
> >> >> >
> >> >> > Best regards,
> >> >> > Thomas
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > View this message in context:
> >> >> >
> >> >>
> >>
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
> >> >> To unsubscribe from Use external database for persistent timer
> service,
> >> >> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.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/Use-external-database-for-persistent-timer-service-tp4658321p4658507.html
> >> To unsubscribe from Use external database for persistent timer service,
> >> click here.
> >> NAML
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658607.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/Use-external-database-for-persistent-timer-service-tp4658321p4658611.html
> To unsubscribe from Use external database for persistent timer service,
> click here.
> NAML
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658626.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

Great work.
It looks much better now. 
The programmatic timer is working as expected – even if a server startup is done in the meanwhile.

The automatic timer is also working but shows a strange behavior while server startup:
1) If no programmatic timer is available
   -> automatic timer is executed two minutes after TomEE startup!
2) If a programmatic timer is defined and its trigger timestamp has not passed while TomEE was down
   -> programmatic timer is triggered correctly, but automatic timer is executed two minutes after TomEE startup!
3) If a programmatic timer is defined and its trigger timestamp has passed while TomEE was down
   -> programmatic timer is triggered while TomEE startup (as expected), the automatic timer is also executed immediately after TomEE startup (as expected)!

But the most important improvement: The server starts in any case, no timer events are lost and no need to recreate the quartz tables any more.

I know, you think quartz is responsible for the two minutes delay in 1) & 2) before automatic timer starts to fire.
But I don't think so because of the behavior in 3) where the automatic timer starts to fire immediately after TomEE startup.

Just for curiosity:
Will the changes be integrated into a patch for TomEE 1.5.0 or only be available with TomEE 1.5.1?
Do you already know when TomEE 1.5.1 will be available?
 
Best regards,
	Thomas

-----

From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658611h51@n4.nabble.com] 
Sent: Mittwoch, 14. November 2012 18:40
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

just commited some change about it, 

if you can test with tmr snapshot it would be wonderful 

*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*




2012/11/14 Romain Manni-Bucau <[hidden email]> 

> it is more or less what is done today, EjbTimerServiceImpl etc are 
> serialized with the miminum of data saved (and their types are string 
> etc...) but you can't see it in the database. 
> 
> The point is even if you respect it updating versions can break it. 
> 
> The only way to be sure the update is free is: 
> 1) serialize the data as something not java dependent (here i think we 
> should ask quartz) 
> 2) manage missing attributes in the code when addind one 
> 
> We (TomEE) can manage 2 but i'd prefer to let quartz manage 1 since it is 
> not directly TomEE related and other quartz usages can benefit from it 
> 
> wdyt? 
> 
> *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*
> 
> 
> 
> 
> 2012/11/14 tschuler <[hidden email]> 
> 
>> Hi Romain! 
>> 
>> Yes, quartz is responsible for the serialization. 
>> The JobData that is serialized into the database is simply a map. 
>> The data included in the map is set by the application – in your case 
>> TomEE is doing it. 
>> It mainly includes: 
>> - EJB_TIMERS_SERVICE - an object of type 
>> org.apache.openejb.core.timer.EjbTimerServiceImpl 
>> - TIMER_DATA - an object of type org.apache.openejb.core.timer.TimerData 
>> These are objects put to the JobData in 
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.schedule(TimerData 
>> timerData). 
>> 
>> What I am concerned about is that a timer added with e.g. TomEE 1.5.0 
>> cannot be executed within TomEE 1.5.1 because the deserialization fails. 
>> To my way of thinking, it would be better to add only the relevant data 
>> as simple data types (String, Integer, ...) to the JobData. 
>> That would allow changes to the EjbTimerServiceImpl (or TimerData) 
>> implementation without getting into incompatibility problems because of 
>> deserialization issues within persisted timers added by a former TomEE 
>> version. 
>> 
>> Best regards, 
>>         Thomas 
>> 
>> ----- 
>> 
>> From: Romain Manni-Bucau [via OpenEJB] [mailto: 
>> [hidden email]] 
>> Sent: Samstag, 10. November 2012 10:44 
>> To: Thomas Schuler 
>> Subject: Re: Use external database for persistent timer service 
>> 
>> about serialization stuff: it is completely managed by quartz 
>> (org.quartz.impl.jdbcjobstore.StdJDBCDelegate  and all its children - one 
>> by database type) 
>> 
>> we could recreate the hierarchy  (you too normally configuring quartz to 
>> use the context classloader and since you have not to be so generic as us 
>> you can simply override serialization method in a single class) but IMO if 
>> this need is relevant for you it should be pushed to quartz itself, wdyt? 
>> 
>> *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*
>> 
>> 
>> 
>> 
>> 2012/11/9 Romain Manni-Bucau <[hidden email]> 
>> 
>> > I pushed some stuff yesterday about 2 (well can be linked even if not 
>> > direct) so it should be in the snapshot 
>> > Le 9 nov. 2012 13:16, "tschuler" <[hidden email]> a écrit : 
>> > 
>> >  Hi Romain! 
>> >> 
>> >> About 1: It may be a config issue, but I don't think so - doesn't 
>> matter 
>> >> right now. 
>> >> About 2: If you have a solution for it, please let me know. Would be 
>> >> included in a future snapshot, I think? 
>> >> About 3: We need to be sure that timer issues using e.g. the actual 
>> TomEE 
>> >> version can be executed using the next TomEE version. 
>> >>                As there are serialized OpenEJB classes in the quartz 
>> >> database, they may be incompatible with the class definition included 
>> in a 
>> >> future TomEE version. 
>> >> 
>> >> Best regards, 
>> >>                 Thomas 
>> >> 
>> >> 
>> >> From: Romain Manni-Bucau [via OpenEJB] [mailto: 
>> >> [hidden email]] 
>> >> Sent: Donnerstag, 8. November 2012 22:38 
>> >> To: Thomas Schuler 
>> >> Subject: Re: Use external database for persistent timer service 
>> >> 
>> >> about 1: maybe just a quartz config 
>> >> about 2: looking into it, think i got why but thinking to the best 
>> >> solution* 
>> >> about 3: we can store it as we want. That said not sure it'd be used, 
>> if 
>> >> you change your tomee instance you often reset some datas (and i think 
>> >> these timers can be resetted in such a case, no?) 
>> >> 
>> >> *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*
>> >> 
>> >> 
>> >> 
>> >> 
>> >> 2012/11/8 tschuler <[hidden 
>> >> email]</user/SendEmail.jtp?type=node&node=4658490&i=0>> 
>> >> 
>> >> > Hi! 
>> >> > 
>> >> > I tried todays snapshot and it worked better if TomEE is running all 
>> the 
>> >> > time. 
>> >> > But in case of TomEE restart a few errors happen for persisted 
>> timers. 
>> >> > 
>> >> > 1) automatic timeout: 
>> >> >     It takes two minutes until the timer fires again 
>> >> > 
>> >> >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina 
>> start 
>> >> >         INFO: Server startup in 2357 ms 
>> >> >         08.11.2012 14:29:45 
>> org.quartz.impl.jdbcjobstore.JobStoreSupport 
>> >> > logWarnIfNonZero 
>> >> >         INFO: ClusterManager: detected 1 failed or restarted 
>> instances. 
>> >> >         08.11.2012 14:29:45 
>> org.quartz.impl.jdbcjobstore.JobStoreSupport 
>> >> > clusterRecover 
>> >> >         INFO: ClusterManager: Scanning for instance 
>> >> > "DE064071352380642408"'s 
>> >> > failed in-progress jobs. 
>> >> >         08.11.2012 14:29:45 
>> org.quartz.impl.jdbcjobstore.JobStoreSupport 
>> >> > logWarnIfNonZero 
>> >> >         INFO: ClusterManager: ......Freed 1 acquired trigger(s). 
>> >> >         08.11.2012 14:30:45 
>> org.quartz.impl.jdbcjobstore.JobStoreSupport 
>> >> > recoverMisfiredJobs 
>> >> >         INFO: Handling 1 trigger(s) that missed their scheduled 
>> >> fire-time. 
>> >> >         08.11.2012 14:30:45 
>> timerPersisted.server.SchedulerBeanAutomated 
>> >> > automaticTimeout 
>> >> >         INFO: Automatic timeout occured 
>> >> > 
>> >> > 2) automatic and programmatic timeouts: 
>> >> >     TomEE kill prevented the execution of five programmatic timeouts, 
>> >> while 
>> >> > server restart the first programmatic timeout causes an error and is 
>> >> never 
>> >> > executed 
>> >> > 
>> >> >         INFO: OpenWebBeans Container has started, it took 10 ms. 
>> >> >         08.11.2012 16:59:02 
>> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout 
>> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted 
>> >> >         org.apache.openejb.OpenEJBException: Deployment does not 
>> exist 
>> >> in 
>> >> > this container. Deployment(id='SchedulerBeanPersisted'), 
>> >> Container(id='My 
>> >> > Singleton Container') 
>> >> >                 at 
>> >> > 
>> >> > 
>> >> 
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180) 
>> >> >                 at 
>> >> > 
>> >> > 
>> >> 
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552) 
>> >> >                 at 
>> >> > 
>> >> 
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39) 
>> >> >                 at 
>> org.quartz.core.JobRunShell.run(JobRunShell.java:213) 
>> >> >                 at 
>> >> > 
>> >> > 
>> >> 
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) 
>> >> >         08.11.2012 16:59:02 
>> >> org.apache.openejb.assembler.classic.Assembler 
>> >> > createApplication 
>> >> >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated, 
>> >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container) 
>> >> >         08.11.2012 16:59:02 
>> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout 
>> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted 
>> >> >         org.apache.openejb.OpenEJBException: Deployment does not 
>> exist 
>> >> in 
>> >> > this container. Deployment(id='SchedulerBeanPersisted'), 
>> >> Container(id='My 
>> >> > Singleton Container') 
>> >> >                 at 
>> >> > 
>> >> > 
>> >> 
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180) 
>> >> >                 at 
>> >> > 
>> >> > 
>> >> 
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552) 
>> >> >                 at 
>> >> > 
>> >> 
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39) 
>> >> >                 at 
>> org.quartz.core.JobRunShell.run(JobRunShell.java:213) 
>> >> >                 at 
>> >> > 
>> >> > 
>> >> 
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) 
>> >> >         08.11.2012 16:59:02 
>> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout 
>> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted 
>> >> >         org.apache.openejb.OpenEJBException: Deployment does not 
>> exist 
>> >> in 
>> >> > this container. Deployment(id='SchedulerBeanPersisted'), 
>> >> Container(id='My 
>> >> > Singleton Container') 
>> >> >                 at 
>> >> > 
>> >> > 
>> >> 
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180) 
>> >> >                 at 
>> >> > 
>> >> > 
>> >> 
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552) 
>> >> >                 at 
>> >> > 
>> >> 
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39) 
>> >> >                 at 
>> org.quartz.core.JobRunShell.run(JobRunShell.java:213) 
>> >> >                 at 
>> >> > 
>> >> > 
>> >> 
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) 
>> >> >         08.11.2012 16:59:02 
>> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout 
>> >> >         WARNUNG: Failed to execute ejbTimeout on 
>> SchedulerBeanPersisted 
>> >> > successfully within 1 attempts 
>> >> >         08.11.2012 16:59:02 
>> >> org.apache.openejb.assembler.classic.Assembler 
>> >> > createApplication 
>> >> >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted, 
>> >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container) 
>> >> >         08.11.2012 16:59:02 
>> >> org.apache.openejb.assembler.classic.Assembler 
>> >> > createApplication 
>> >> >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated, 
>> >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container) 
>> >> >         08.11.2012 16:59:02 
>> >> org.apache.openejb.assembler.classic.Assembler 
>> >> > createApplication 
>> >> >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted, 
>> >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container) 
>> >> >         08.11.2012 16:59:02 
>> >> org.apache.openejb.assembler.classic.Assembler 
>> >> > createApplication 
>> >> >         INFO: Deployed 
>> >> > 
>> >> > 
>> >> 
>> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted) 
>> >> >         08.11.2012 16:59:02 
>> timerPersisted.server.SchedulerBeanPersisted 
>> >> > programmaticTimeout 
>> >> >         INFO: Programmatic timeout occurred. 
>> >> > 
>> >> > 3) Having a look into the quartz database tables, I can see that 
>> >> JOB_DATA 
>> >> > column of table QRTZ_TRIGGERS includes the, let me call it timer 
>> >> context. 
>> >> >     This timer context includes serialized objects. 
>> >> >     What I am wondering about is how you can garantee that the timer 
>> >> events 
>> >> > can be executed with an updated TomEE version that may include an 
>> >> update of 
>> >> > the serialzed objects? 
>> >> > 
>> >> > Best regards, 
>> >> > Thomas 
>> >> > 
>> >> > 
>> >> > 
>> >> > -- 
>> >> > View this message in context: 
>> >> > 
>> >> 
>> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
>> >> To unsubscribe from Use external database for persistent timer service, 
>> >> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.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/Use-external-database-for-persistent-timer-service-tp4658321p4658507.html
>> To unsubscribe from Use external database for persistent timer service, 
>> click here. 
>> NAML 
>> 
>> 
>> 
>> 
>> -- 
>> View this message in context: 
>> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658607.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/Use-external-database-for-persistent-timer-service-tp4658321p4658611.html 
To unsubscribe from Use external database for persistent timer service, click here.
NAML 




--
View this message in context: http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658626.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
just commited some change about it,

if you can test with tmr snapshot it would be wonderful

*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*




2012/11/14 Romain Manni-Bucau <rm...@gmail.com>

> it is more or less what is done today, EjbTimerServiceImpl etc are
> serialized with the miminum of data saved (and their types are string
> etc...) but you can't see it in the database.
>
> The point is even if you respect it updating versions can break it.
>
> The only way to be sure the update is free is:
> 1) serialize the data as something not java dependent (here i think we
> should ask quartz)
> 2) manage missing attributes in the code when addind one
>
> We (TomEE) can manage 2 but i'd prefer to let quartz manage 1 since it is
> not directly TomEE related and other quartz usages can benefit from it
>
> wdyt?
>
> *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*
>
>
>
>
> 2012/11/14 tschuler <th...@opentext.com>
>
>> Hi Romain!
>>
>> Yes, quartz is responsible for the serialization.
>> The JobData that is serialized into the database is simply a map.
>> The data included in the map is set by the application – in your case
>> TomEE is doing it.
>> It mainly includes:
>> - EJB_TIMERS_SERVICE - an object of type
>> org.apache.openejb.core.timer.EjbTimerServiceImpl
>> - TIMER_DATA - an object of type org.apache.openejb.core.timer.TimerData
>> These are objects put to the JobData in
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.schedule(TimerData
>> timerData).
>>
>> What I am concerned about is that a timer added with e.g. TomEE 1.5.0
>> cannot be executed within TomEE 1.5.1 because the deserialization fails.
>> To my way of thinking, it would be better to add only the relevant data
>> as simple data types (String, Integer, ...) to the JobData.
>> That would allow changes to the EjbTimerServiceImpl (or TimerData)
>> implementation without getting into incompatibility problems because of
>> deserialization issues within persisted timers added by a former TomEE
>> version.
>>
>> Best regards,
>>         Thomas
>>
>> -----
>>
>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
>> ml-node+s979440n4658507h27@n4.nabble.com]
>> Sent: Samstag, 10. November 2012 10:44
>> To: Thomas Schuler
>> Subject: Re: Use external database for persistent timer service
>>
>> about serialization stuff: it is completely managed by quartz
>> (org.quartz.impl.jdbcjobstore.StdJDBCDelegate  and all its children - one
>> by database type)
>>
>> we could recreate the hierarchy  (you too normally configuring quartz to
>> use the context classloader and since you have not to be so generic as us
>> you can simply override serialization method in a single class) but IMO if
>> this need is relevant for you it should be pushed to quartz itself, wdyt?
>>
>> *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*
>>
>>
>>
>>
>> 2012/11/9 Romain Manni-Bucau <[hidden email]>
>>
>> > I pushed some stuff yesterday about 2 (well can be linked even if not
>> > direct) so it should be in the snapshot
>> > Le 9 nov. 2012 13:16, "tschuler" <[hidden email]> a écrit :
>> >
>> >  Hi Romain!
>> >>
>> >> About 1: It may be a config issue, but I don't think so - doesn't
>> matter
>> >> right now.
>> >> About 2: If you have a solution for it, please let me know. Would be
>> >> included in a future snapshot, I think?
>> >> About 3: We need to be sure that timer issues using e.g. the actual
>> TomEE
>> >> version can be executed using the next TomEE version.
>> >>                As there are serialized OpenEJB classes in the quartz
>> >> database, they may be incompatible with the class definition included
>> in a
>> >> future TomEE version.
>> >>
>> >> Best regards,
>> >>                 Thomas
>> >>
>> >>
>> >> From: Romain Manni-Bucau [via OpenEJB] [mailto:
>> >> [hidden email]]
>> >> Sent: Donnerstag, 8. November 2012 22:38
>> >> To: Thomas Schuler
>> >> Subject: Re: Use external database for persistent timer service
>> >>
>> >> about 1: maybe just a quartz config
>> >> about 2: looking into it, think i got why but thinking to the best
>> >> solution*
>> >> about 3: we can store it as we want. That said not sure it'd be used,
>> if
>> >> you change your tomee instance you often reset some datas (and i think
>> >> these timers can be resetted in such a case, no?)
>> >>
>> >> *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*
>> >>
>> >>
>> >>
>> >>
>> >> 2012/11/8 tschuler <[hidden
>> >> email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>
>> >>
>> >> > Hi!
>> >> >
>> >> > I tried todays snapshot and it worked better if TomEE is running all
>> the
>> >> > time.
>> >> > But in case of TomEE restart a few errors happen for persisted
>> timers.
>> >> >
>> >> > 1) automatic timeout:
>> >> >     It takes two minutes until the timer fires again
>> >> >
>> >> >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina
>> start
>> >> >         INFO: Server startup in 2357 ms
>> >> >         08.11.2012 14:29:45
>> org.quartz.impl.jdbcjobstore.JobStoreSupport
>> >> > logWarnIfNonZero
>> >> >         INFO: ClusterManager: detected 1 failed or restarted
>> instances.
>> >> >         08.11.2012 14:29:45
>> org.quartz.impl.jdbcjobstore.JobStoreSupport
>> >> > clusterRecover
>> >> >         INFO: ClusterManager: Scanning for instance
>> >> > "DE064071352380642408"'s
>> >> > failed in-progress jobs.
>> >> >         08.11.2012 14:29:45
>> org.quartz.impl.jdbcjobstore.JobStoreSupport
>> >> > logWarnIfNonZero
>> >> >         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
>> >> >         08.11.2012 14:30:45
>> org.quartz.impl.jdbcjobstore.JobStoreSupport
>> >> > recoverMisfiredJobs
>> >> >         INFO: Handling 1 trigger(s) that missed their scheduled
>> >> fire-time.
>> >> >         08.11.2012 14:30:45
>> timerPersisted.server.SchedulerBeanAutomated
>> >> > automaticTimeout
>> >> >         INFO: Automatic timeout occured
>> >> >
>> >> > 2) automatic and programmatic timeouts:
>> >> >     TomEE kill prevented the execution of five programmatic timeouts,
>> >> while
>> >> > server restart the first programmatic timeout causes an error and is
>> >> never
>> >> > executed
>> >> >
>> >> >         INFO: OpenWebBeans Container has started, it took 10 ms.
>> >> >         08.11.2012 16:59:02
>> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>> >> >         org.apache.openejb.OpenEJBException: Deployment does not
>> exist
>> >> in
>> >> > this container. Deployment(id='SchedulerBeanPersisted'),
>> >> Container(id='My
>> >> > Singleton Container')
>> >> >                 at
>> >> >
>> >> >
>> >>
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>> >> >                 at
>> >> >
>> >> >
>> >>
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>> >> >                 at
>> >> >
>> >>
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>> >> >                 at
>> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>> >> >                 at
>> >> >
>> >> >
>> >>
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>> >> >         08.11.2012 16:59:02
>> >> org.apache.openejb.assembler.classic.Assembler
>> >> > createApplication
>> >> >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
>> >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
>> >> >         08.11.2012 16:59:02
>> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>> >> >         org.apache.openejb.OpenEJBException: Deployment does not
>> exist
>> >> in
>> >> > this container. Deployment(id='SchedulerBeanPersisted'),
>> >> Container(id='My
>> >> > Singleton Container')
>> >> >                 at
>> >> >
>> >> >
>> >>
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>> >> >                 at
>> >> >
>> >> >
>> >>
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>> >> >                 at
>> >> >
>> >>
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>> >> >                 at
>> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>> >> >                 at
>> >> >
>> >> >
>> >>
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>> >> >         08.11.2012 16:59:02
>> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>> >> >         org.apache.openejb.OpenEJBException: Deployment does not
>> exist
>> >> in
>> >> > this container. Deployment(id='SchedulerBeanPersisted'),
>> >> Container(id='My
>> >> > Singleton Container')
>> >> >                 at
>> >> >
>> >> >
>> >>
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>> >> >                 at
>> >> >
>> >> >
>> >>
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>> >> >                 at
>> >> >
>> >>
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>> >> >                 at
>> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>> >> >                 at
>> >> >
>> >> >
>> >>
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>> >> >         08.11.2012 16:59:02
>> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>> >> >         WARNUNG: Failed to execute ejbTimeout on
>> SchedulerBeanPersisted
>> >> > successfully within 1 attempts
>> >> >         08.11.2012 16:59:02
>> >> org.apache.openejb.assembler.classic.Assembler
>> >> > createApplication
>> >> >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
>> >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
>> >> >         08.11.2012 16:59:02
>> >> org.apache.openejb.assembler.classic.Assembler
>> >> > createApplication
>> >> >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
>> >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
>> >> >         08.11.2012 16:59:02
>> >> org.apache.openejb.assembler.classic.Assembler
>> >> > createApplication
>> >> >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
>> >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
>> >> >         08.11.2012 16:59:02
>> >> org.apache.openejb.assembler.classic.Assembler
>> >> > createApplication
>> >> >         INFO: Deployed
>> >> >
>> >> >
>> >>
>> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
>> >> >         08.11.2012 16:59:02
>> timerPersisted.server.SchedulerBeanPersisted
>> >> > programmaticTimeout
>> >> >         INFO: Programmatic timeout occurred.
>> >> >
>> >> > 3) Having a look into the quartz database tables, I can see that
>> >> JOB_DATA
>> >> > column of table QRTZ_TRIGGERS includes the, let me call it timer
>> >> context.
>> >> >     This timer context includes serialized objects.
>> >> >     What I am wondering about is how you can garantee that the timer
>> >> events
>> >> > can be executed with an updated TomEE version that may include an
>> >> update of
>> >> > the serialzed objects?
>> >> >
>> >> > Best regards,
>> >> > Thomas
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > View this message in context:
>> >> >
>> >>
>> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
>> >> To unsubscribe from Use external database for persistent timer service,
>> >> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.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/Use-external-database-for-persistent-timer-service-tp4658321p4658507.html
>> To unsubscribe from Use external database for persistent timer service,
>> click here.
>> NAML
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658607.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>
>

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
it is more or less what is done today, EjbTimerServiceImpl etc are
serialized with the miminum of data saved (and their types are string
etc...) but you can't see it in the database.

The point is even if you respect it updating versions can break it.

The only way to be sure the update is free is:
1) serialize the data as something not java dependent (here i think we
should ask quartz)
2) manage missing attributes in the code when addind one

We (TomEE) can manage 2 but i'd prefer to let quartz manage 1 since it is
not directly TomEE related and other quartz usages can benefit from it

wdyt?

*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*




2012/11/14 tschuler <th...@opentext.com>

> Hi Romain!
>
> Yes, quartz is responsible for the serialization.
> The JobData that is serialized into the database is simply a map.
> The data included in the map is set by the application – in your case
> TomEE is doing it.
> It mainly includes:
> - EJB_TIMERS_SERVICE - an object of type
> org.apache.openejb.core.timer.EjbTimerServiceImpl
> - TIMER_DATA - an object of type org.apache.openejb.core.timer.TimerData
> These are objects put to the JobData in
> org.apache.openejb.core.timer.EjbTimerServiceImpl.schedule(TimerData
> timerData).
>
> What I am concerned about is that a timer added with e.g. TomEE 1.5.0
> cannot be executed within TomEE 1.5.1 because the deserialization fails.
> To my way of thinking, it would be better to add only the relevant data as
> simple data types (String, Integer, ...) to the JobData.
> That would allow changes to the EjbTimerServiceImpl (or TimerData)
> implementation without getting into incompatibility problems because of
> deserialization issues within persisted timers added by a former TomEE
> version.
>
> Best regards,
>         Thomas
>
> -----
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658507h27@n4.nabble.com]
> Sent: Samstag, 10. November 2012 10:44
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> about serialization stuff: it is completely managed by quartz
> (org.quartz.impl.jdbcjobstore.StdJDBCDelegate  and all its children - one
> by database type)
>
> we could recreate the hierarchy  (you too normally configuring quartz to
> use the context classloader and since you have not to be so generic as us
> you can simply override serialization method in a single class) but IMO if
> this need is relevant for you it should be pushed to quartz itself, wdyt?
>
> *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*
>
>
>
>
> 2012/11/9 Romain Manni-Bucau <[hidden email]>
>
> > I pushed some stuff yesterday about 2 (well can be linked even if not
> > direct) so it should be in the snapshot
> > Le 9 nov. 2012 13:16, "tschuler" <[hidden email]> a écrit :
> >
> >  Hi Romain!
> >>
> >> About 1: It may be a config issue, but I don't think so - doesn't matter
> >> right now.
> >> About 2: If you have a solution for it, please let me know. Would be
> >> included in a future snapshot, I think?
> >> About 3: We need to be sure that timer issues using e.g. the actual
> TomEE
> >> version can be executed using the next TomEE version.
> >>                As there are serialized OpenEJB classes in the quartz
> >> database, they may be incompatible with the class definition included
> in a
> >> future TomEE version.
> >>
> >> Best regards,
> >>                 Thomas
> >>
> >>
> >> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> >> [hidden email]]
> >> Sent: Donnerstag, 8. November 2012 22:38
> >> To: Thomas Schuler
> >> Subject: Re: Use external database for persistent timer service
> >>
> >> about 1: maybe just a quartz config
> >> about 2: looking into it, think i got why but thinking to the best
> >> solution*
> >> about 3: we can store it as we want. That said not sure it'd be used, if
> >> you change your tomee instance you often reset some datas (and i think
> >> these timers can be resetted in such a case, no?)
> >>
> >> *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*
> >>
> >>
> >>
> >>
> >> 2012/11/8 tschuler <[hidden
> >> email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>
> >>
> >> > Hi!
> >> >
> >> > I tried todays snapshot and it worked better if TomEE is running all
> the
> >> > time.
> >> > But in case of TomEE restart a few errors happen for persisted timers.
> >> >
> >> > 1) automatic timeout:
> >> >     It takes two minutes until the timer fires again
> >> >
> >> >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start
> >> >         INFO: Server startup in 2357 ms
> >> >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> > logWarnIfNonZero
> >> >         INFO: ClusterManager: detected 1 failed or restarted
> instances.
> >> >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> > clusterRecover
> >> >         INFO: ClusterManager: Scanning for instance
> >> > "DE064071352380642408"'s
> >> > failed in-progress jobs.
> >> >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> > logWarnIfNonZero
> >> >         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
> >> >         08.11.2012 14:30:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> >> > recoverMisfiredJobs
> >> >         INFO: Handling 1 trigger(s) that missed their scheduled
> >> fire-time.
> >> >         08.11.2012 14:30:45
> timerPersisted.server.SchedulerBeanAutomated
> >> > automaticTimeout
> >> >         INFO: Automatic timeout occured
> >> >
> >> > 2) automatic and programmatic timeouts:
> >> >     TomEE kill prevented the execution of five programmatic timeouts,
> >> while
> >> > server restart the first programmatic timeout causes an error and is
> >> never
> >> > executed
> >> >
> >> >         INFO: OpenWebBeans Container has started, it took 10 ms.
> >> >         08.11.2012 16:59:02
> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >> >         org.apache.openejb.OpenEJBException: Deployment does not exist
> >> in
> >> > this container. Deployment(id='SchedulerBeanPersisted'),
> >> Container(id='My
> >> > Singleton Container')
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >> >                 at
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >> >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >> >                 at
> >> >
> >> >
> >>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >> >         08.11.2012 16:59:02
> >> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
> >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> >> >         08.11.2012 16:59:02
> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >> >         org.apache.openejb.OpenEJBException: Deployment does not exist
> >> in
> >> > this container. Deployment(id='SchedulerBeanPersisted'),
> >> Container(id='My
> >> > Singleton Container')
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >> >                 at
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >> >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >> >                 at
> >> >
> >> >
> >>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >> >         08.11.2012 16:59:02
> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >> >         org.apache.openejb.OpenEJBException: Deployment does not exist
> >> in
> >> > this container. Deployment(id='SchedulerBeanPersisted'),
> >> Container(id='My
> >> > Singleton Container')
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >> >                 at
> >> >
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >> >                 at
> >> >
> >>
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >> >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >> >                 at
> >> >
> >> >
> >>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >> >         08.11.2012 16:59:02
> >> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >> >         WARNUNG: Failed to execute ejbTimeout on
> SchedulerBeanPersisted
> >> > successfully within 1 attempts
> >> >         08.11.2012 16:59:02
> >> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
> >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> >> >         08.11.2012 16:59:02
> >> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
> >> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> >> >         08.11.2012 16:59:02
> >> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
> >> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> >> >         08.11.2012 16:59:02
> >> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> >         INFO: Deployed
> >> >
> >> >
> >>
> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
> >> >         08.11.2012 16:59:02
> timerPersisted.server.SchedulerBeanPersisted
> >> > programmaticTimeout
> >> >         INFO: Programmatic timeout occurred.
> >> >
> >> > 3) Having a look into the quartz database tables, I can see that
> >> JOB_DATA
> >> > column of table QRTZ_TRIGGERS includes the, let me call it timer
> >> context.
> >> >     This timer context includes serialized objects.
> >> >     What I am wondering about is how you can garantee that the timer
> >> events
> >> > can be executed with an updated TomEE version that may include an
> >> update of
> >> > the serialzed objects?
> >> >
> >> > Best regards,
> >> > Thomas
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >> >
> >>
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
> >> To unsubscribe from Use external database for persistent timer service,
> >> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.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/Use-external-database-for-persistent-timer-service-tp4658321p4658507.html
> To unsubscribe from Use external database for persistent timer service,
> click here.
> NAML
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658607.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

Yes, quartz is responsible for the serialization.
The JobData that is serialized into the database is simply a map.
The data included in the map is set by the application – in your case TomEE is doing it.
It mainly includes:
- EJB_TIMERS_SERVICE - an object of type org.apache.openejb.core.timer.EjbTimerServiceImpl
- TIMER_DATA - an object of type org.apache.openejb.core.timer.TimerData
These are objects put to the JobData in org.apache.openejb.core.timer.EjbTimerServiceImpl.schedule(TimerData timerData).

What I am concerned about is that a timer added with e.g. TomEE 1.5.0 cannot be executed within TomEE 1.5.1 because the deserialization fails.
To my way of thinking, it would be better to add only the relevant data as simple data types (String, Integer, ...) to the JobData.
That would allow changes to the EjbTimerServiceImpl (or TimerData) implementation without getting into incompatibility problems because of deserialization issues within persisted timers added by a former TomEE version.

Best regards,
	Thomas

-----

From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658507h27@n4.nabble.com] 
Sent: Samstag, 10. November 2012 10:44
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

about serialization stuff: it is completely managed by quartz 
(org.quartz.impl.jdbcjobstore.StdJDBCDelegate  and all its children - one 
by database type) 

we could recreate the hierarchy  (you too normally configuring quartz to 
use the context classloader and since you have not to be so generic as us 
you can simply override serialization method in a single class) but IMO if 
this need is relevant for you it should be pushed to quartz itself, wdyt? 

*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*




2012/11/9 Romain Manni-Bucau <[hidden email]> 

> I pushed some stuff yesterday about 2 (well can be linked even if not 
> direct) so it should be in the snapshot 
> Le 9 nov. 2012 13:16, "tschuler" <[hidden email]> a écrit : 
> 
>  Hi Romain! 
>> 
>> About 1: It may be a config issue, but I don't think so - doesn't matter 
>> right now. 
>> About 2: If you have a solution for it, please let me know. Would be 
>> included in a future snapshot, I think? 
>> About 3: We need to be sure that timer issues using e.g. the actual TomEE 
>> version can be executed using the next TomEE version. 
>>                As there are serialized OpenEJB classes in the quartz 
>> database, they may be incompatible with the class definition included in a 
>> future TomEE version. 
>> 
>> Best regards, 
>>                 Thomas 
>> 
>> 
>> From: Romain Manni-Bucau [via OpenEJB] [mailto: 
>> [hidden email]] 
>> Sent: Donnerstag, 8. November 2012 22:38 
>> To: Thomas Schuler 
>> Subject: Re: Use external database for persistent timer service 
>> 
>> about 1: maybe just a quartz config 
>> about 2: looking into it, think i got why but thinking to the best 
>> solution* 
>> about 3: we can store it as we want. That said not sure it'd be used, if 
>> you change your tomee instance you often reset some datas (and i think 
>> these timers can be resetted in such a case, no?) 
>> 
>> *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*
>> 
>> 
>> 
>> 
>> 2012/11/8 tschuler <[hidden 
>> email]</user/SendEmail.jtp?type=node&node=4658490&i=0>> 
>> 
>> > Hi! 
>> > 
>> > I tried todays snapshot and it worked better if TomEE is running all the 
>> > time. 
>> > But in case of TomEE restart a few errors happen for persisted timers. 
>> > 
>> > 1) automatic timeout: 
>> >     It takes two minutes until the timer fires again 
>> > 
>> >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start 
>> >         INFO: Server startup in 2357 ms 
>> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport 
>> > logWarnIfNonZero 
>> >         INFO: ClusterManager: detected 1 failed or restarted instances. 
>> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport 
>> > clusterRecover 
>> >         INFO: ClusterManager: Scanning for instance 
>> > "DE064071352380642408"'s 
>> > failed in-progress jobs. 
>> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport 
>> > logWarnIfNonZero 
>> >         INFO: ClusterManager: ......Freed 1 acquired trigger(s). 
>> >         08.11.2012 14:30:45 org.quartz.impl.jdbcjobstore.JobStoreSupport 
>> > recoverMisfiredJobs 
>> >         INFO: Handling 1 trigger(s) that missed their scheduled 
>> fire-time. 
>> >         08.11.2012 14:30:45 timerPersisted.server.SchedulerBeanAutomated 
>> > automaticTimeout 
>> >         INFO: Automatic timeout occured 
>> > 
>> > 2) automatic and programmatic timeouts: 
>> >     TomEE kill prevented the execution of five programmatic timeouts, 
>> while 
>> > server restart the first programmatic timeout causes an error and is 
>> never 
>> > executed 
>> > 
>> >         INFO: OpenWebBeans Container has started, it took 10 ms. 
>> >         08.11.2012 16:59:02 
>> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout 
>> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted 
>> >         org.apache.openejb.OpenEJBException: Deployment does not exist 
>> in 
>> > this container. Deployment(id='SchedulerBeanPersisted'), 
>> Container(id='My 
>> > Singleton Container') 
>> >                 at 
>> > 
>> > 
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180) 
>> >                 at 
>> > 
>> > 
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552) 
>> >                 at 
>> > 
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39) 
>> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213) 
>> >                 at 
>> > 
>> > 
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) 
>> >         08.11.2012 16:59:02 
>> org.apache.openejb.assembler.classic.Assembler 
>> > createApplication 
>> >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated, 
>> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container) 
>> >         08.11.2012 16:59:02 
>> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout 
>> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted 
>> >         org.apache.openejb.OpenEJBException: Deployment does not exist 
>> in 
>> > this container. Deployment(id='SchedulerBeanPersisted'), 
>> Container(id='My 
>> > Singleton Container') 
>> >                 at 
>> > 
>> > 
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180) 
>> >                 at 
>> > 
>> > 
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552) 
>> >                 at 
>> > 
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39) 
>> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213) 
>> >                 at 
>> > 
>> > 
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) 
>> >         08.11.2012 16:59:02 
>> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout 
>> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted 
>> >         org.apache.openejb.OpenEJBException: Deployment does not exist 
>> in 
>> > this container. Deployment(id='SchedulerBeanPersisted'), 
>> Container(id='My 
>> > Singleton Container') 
>> >                 at 
>> > 
>> > 
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180) 
>> >                 at 
>> > 
>> > 
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552) 
>> >                 at 
>> > 
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39) 
>> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213) 
>> >                 at 
>> > 
>> > 
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) 
>> >         08.11.2012 16:59:02 
>> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout 
>> >         WARNUNG: Failed to execute ejbTimeout on SchedulerBeanPersisted 
>> > successfully within 1 attempts 
>> >         08.11.2012 16:59:02 
>> org.apache.openejb.assembler.classic.Assembler 
>> > createApplication 
>> >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted, 
>> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container) 
>> >         08.11.2012 16:59:02 
>> org.apache.openejb.assembler.classic.Assembler 
>> > createApplication 
>> >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated, 
>> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container) 
>> >         08.11.2012 16:59:02 
>> org.apache.openejb.assembler.classic.Assembler 
>> > createApplication 
>> >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted, 
>> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container) 
>> >         08.11.2012 16:59:02 
>> org.apache.openejb.assembler.classic.Assembler 
>> > createApplication 
>> >         INFO: Deployed 
>> > 
>> > 
>> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted) 
>> >         08.11.2012 16:59:02 timerPersisted.server.SchedulerBeanPersisted 
>> > programmaticTimeout 
>> >         INFO: Programmatic timeout occurred. 
>> > 
>> > 3) Having a look into the quartz database tables, I can see that 
>> JOB_DATA 
>> > column of table QRTZ_TRIGGERS includes the, let me call it timer 
>> context. 
>> >     This timer context includes serialized objects. 
>> >     What I am wondering about is how you can garantee that the timer 
>> events 
>> > can be executed with an updated TomEE version that may include an 
>> update of 
>> > the serialzed objects? 
>> > 
>> > Best regards, 
>> > Thomas 
>> > 
>> > 
>> > 
>> > -- 
>> > View this message in context: 
>> > 
>> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
>> To unsubscribe from Use external database for persistent timer service, 
>> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.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/Use-external-database-for-persistent-timer-service-tp4658321p4658507.html 
To unsubscribe from Use external database for persistent timer service, click here.
NAML 




--
View this message in context: http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658607.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
about serialization stuff: it is completely managed by quartz
(org.quartz.impl.jdbcjobstore.StdJDBCDelegate  and all its children - one
by database type)

we could recreate the hierarchy  (you too normally configuring quartz to
use the context classloader and since you have not to be so generic as us
you can simply override serialization method in a single class) but IMO if
this need is relevant for you it should be pushed to quartz itself, wdyt?

*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*




2012/11/9 Romain Manni-Bucau <rm...@gmail.com>

> I pushed some stuff yesterday about 2 (well can be linked even if not
> direct) so it should be in the snapshot
> Le 9 nov. 2012 13:16, "tschuler" <th...@opentext.com> a écrit :
>
>  Hi Romain!
>>
>> About 1: It may be a config issue, but I don't think so - doesn't matter
>> right now.
>> About 2: If you have a solution for it, please let me know. Would be
>> included in a future snapshot, I think?
>> About 3: We need to be sure that timer issues using e.g. the actual TomEE
>> version can be executed using the next TomEE version.
>>                As there are serialized OpenEJB classes in the quartz
>> database, they may be incompatible with the class definition included in a
>> future TomEE version.
>>
>> Best regards,
>>                 Thomas
>>
>>
>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
>> ml-node+s979440n4658490h0@n4.nabble.com]
>> Sent: Donnerstag, 8. November 2012 22:38
>> To: Thomas Schuler
>> Subject: Re: Use external database for persistent timer service
>>
>> about 1: maybe just a quartz config
>> about 2: looking into it, think i got why but thinking to the best
>> solution*
>> about 3: we can store it as we want. That said not sure it'd be used, if
>> you change your tomee instance you often reset some datas (and i think
>> these timers can be resetted in such a case, no?)
>>
>> *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*
>>
>>
>>
>>
>> 2012/11/8 tschuler <[hidden
>> email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>
>>
>> > Hi!
>> >
>> > I tried todays snapshot and it worked better if TomEE is running all the
>> > time.
>> > But in case of TomEE restart a few errors happen for persisted timers.
>> >
>> > 1) automatic timeout:
>> >     It takes two minutes until the timer fires again
>> >
>> >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start
>> >         INFO: Server startup in 2357 ms
>> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
>> > logWarnIfNonZero
>> >         INFO: ClusterManager: detected 1 failed or restarted instances.
>> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
>> > clusterRecover
>> >         INFO: ClusterManager: Scanning for instance
>> > "DE064071352380642408"'s
>> > failed in-progress jobs.
>> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
>> > logWarnIfNonZero
>> >         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
>> >         08.11.2012 14:30:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
>> > recoverMisfiredJobs
>> >         INFO: Handling 1 trigger(s) that missed their scheduled
>> fire-time.
>> >         08.11.2012 14:30:45 timerPersisted.server.SchedulerBeanAutomated
>> > automaticTimeout
>> >         INFO: Automatic timeout occured
>> >
>> > 2) automatic and programmatic timeouts:
>> >     TomEE kill prevented the execution of five programmatic timeouts,
>> while
>> > server restart the first programmatic timeout causes an error and is
>> never
>> > executed
>> >
>> >         INFO: OpenWebBeans Container has started, it took 10 ms.
>> >         08.11.2012 16:59:02
>> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>> >         org.apache.openejb.OpenEJBException: Deployment does not exist
>> in
>> > this container. Deployment(id='SchedulerBeanPersisted'),
>> Container(id='My
>> > Singleton Container')
>> >                 at
>> >
>> >
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>> >                 at
>> >
>> >
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>> >                 at
>> >
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>> >                 at
>> >
>> >
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>> >         08.11.2012 16:59:02
>> org.apache.openejb.assembler.classic.Assembler
>> > createApplication
>> >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
>> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
>> >         08.11.2012 16:59:02
>> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>> >         org.apache.openejb.OpenEJBException: Deployment does not exist
>> in
>> > this container. Deployment(id='SchedulerBeanPersisted'),
>> Container(id='My
>> > Singleton Container')
>> >                 at
>> >
>> >
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>> >                 at
>> >
>> >
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>> >                 at
>> >
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>> >                 at
>> >
>> >
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>> >         08.11.2012 16:59:02
>> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>> >         org.apache.openejb.OpenEJBException: Deployment does not exist
>> in
>> > this container. Deployment(id='SchedulerBeanPersisted'),
>> Container(id='My
>> > Singleton Container')
>> >                 at
>> >
>> >
>> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>> >                 at
>> >
>> >
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>> >                 at
>> >
>> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>> >                 at
>> >
>> >
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>> >         08.11.2012 16:59:02
>> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>> >         WARNUNG: Failed to execute ejbTimeout on SchedulerBeanPersisted
>> > successfully within 1 attempts
>> >         08.11.2012 16:59:02
>> org.apache.openejb.assembler.classic.Assembler
>> > createApplication
>> >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
>> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
>> >         08.11.2012 16:59:02
>> org.apache.openejb.assembler.classic.Assembler
>> > createApplication
>> >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
>> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
>> >         08.11.2012 16:59:02
>> org.apache.openejb.assembler.classic.Assembler
>> > createApplication
>> >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
>> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
>> >         08.11.2012 16:59:02
>> org.apache.openejb.assembler.classic.Assembler
>> > createApplication
>> >         INFO: Deployed
>> >
>> >
>> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
>> >         08.11.2012 16:59:02 timerPersisted.server.SchedulerBeanPersisted
>> > programmaticTimeout
>> >         INFO: Programmatic timeout occurred.
>> >
>> > 3) Having a look into the quartz database tables, I can see that
>> JOB_DATA
>> > column of table QRTZ_TRIGGERS includes the, let me call it timer
>> context.
>> >     This timer context includes serialized objects.
>> >     What I am wondering about is how you can garantee that the timer
>> events
>> > can be executed with an updated TomEE version that may include an
>> update of
>> > the serialzed objects?
>> >
>> > Best regards,
>> > Thomas
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
>> To unsubscribe from Use external database for persistent timer service,
>> click here<
>> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
>> >.
>> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

Sorry that it takes that long.
But now I got the tread dump – see attachment jstackTomEE.txt

Best regards,
                Thomas

From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658531h71@n4.nabble.com]
Sent: Montag, 12. November 2012 15:35
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

Hi,

if it hangs can you please take a thread dump at this moment (if you have a
jdk type in a console "jps" -> find Boostrap id then "jstack <id>") please?

*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*




2012/11/12 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658531&i=0>>

> Hi Romain!
>
> Taking the snapshot from today (Monday 12) looks better but still not good
> enough I think.
>
> The following situation: An automticTimer is running and a programmatic
> timer is added (but yet not fired).
> End TomEE. Wait till trigger time of programmatic trigger passed. Start
> TomEE.
>
> è Startup sequence seems to hang, no access to SchedulerBeanPersisted.
>
> 12.11.2012 13:24:27 org.quartz.core.QuartzScheduler initialize
> INFO: Scheduler meta-data: Quartz Scheduler (v2.1.6) 'MyScheduler' with
> instanceId 'DE064071352723067406'
>   Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
>   NOT STARTED.
>   Currently in standby mode.
>   Number of jobs executed: 0
>   Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 4 threads.
>   Using job-store 'org.quartz.impl.jdbcjobstore.JobStoreCMT' - which
> supports persistence. and is clustered.
> 12.11.2012 13:24:27 org.quartz.impl.StdSchedulerFactory instantiate
> INFO: Quartz scheduler 'MyScheduler' initialized from an externally
> provided properties instance.
> 12.11.2012 13:24:27 org.quartz.impl.StdSchedulerFactory instantiate
> INFO: Quartz scheduler version: 2.1.6
> 12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport
> logWarnIfNonZero
> INFO: ClusterManager: detected 1 failed or restarted instances.
> 12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport
> clusterRecover
> INFO: ClusterManager: Scanning for instance "DE064071352722853574"'s
> failed in-progress jobs.
> 12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport
> logWarnIfNonZero
> INFO: ClusterManager: ......Freed 1 acquired trigger(s).
> 12.11.2012 13:24:27 org.quartz.core.QuartzScheduler start
> INFO: Scheduler MyScheduler_$_DE064071352723067406 started.
> 12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport
> recoverMisfiredJobs
> INFO: Handling 1 trigger(s) that missed their scheduled fire-time.
>
> All following startups of TomEE show the same behavior, but slightly
> different log messages at the end:
> […]
> 12.11.2012 13:45:03 org.quartz.impl.jdbcjobstore.JobStoreSupport
> logWarnIfNonZero
> INFO: ClusterManager: detected 1 failed or restarted instances.
> 12.11.2012 13:45:03 org.quartz.impl.jdbcjobstore.JobStoreSupport
> clusterRecover
> INFO: ClusterManager: Scanning for instance "DE064071352724225831"'s
> failed in-progress jobs.
> 12.11.2012 13:45:03 org.quartz.core.QuartzScheduler start
> INFO: Scheduler MyScheduler_$_DE064071352724303131 started.
> 12.11.2012 13:45:03 org.quartz.impl.jdbcjobstore.JobStoreSupport
> recoverMisfiredJobs
> INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
>
> A cleanup of the quartz tables is needed to get the application running
> again.
>
> Best regards,
>                 Thomas
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=4658531&i=1>]
> Sent: Freitag, 9. November 2012 15:30
> To: Thomas Schuler
> Subject: RE: Use external database for persistent timer service
>
> I pushed some stuff yesterday about 2 (well can be linked even if not
> direct) so it should be in the snapshot
> Le 9 nov. 2012 13:16, "tschuler" <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658497&i=0>> a écrit :
>
> > Hi Romain!
> >
> > About 1: It may be a config issue, but I don't think so - doesn't matter
> > right now.
> > About 2: If you have a solution for it, please let me know. Would be
> > included in a future snapshot, I think?
> > About 3: We need to be sure that timer issues using e.g. the actual TomEE
> > version can be executed using the next TomEE version.
> >                As there are serialized OpenEJB classes in the quartz
> > database, they may be incompatible with the class definition included in
> a
> > future TomEE version.
> >
> > Best regards,
> >                 Thomas
> >
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4658497&i=1>]
> > Sent: Donnerstag, 8. November 2012 22:38
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > about 1: maybe just a quartz config
> > about 2: looking into it, think i got why but thinking to the best
> > solution*
> > about 3: we can store it as we want. That said not sure it'd be used, if
> > you change your tomee instance you often reset some datas (and i think
> > these timers can be resetted in such a case, no?)
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/8 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>
> >
> > > Hi!
> > >
> > > I tried todays snapshot and it worked better if TomEE is running all
> the
> > > time.
> > > But in case of TomEE restart a few errors happen for persisted timers.
> > >
> > > 1) automatic timeout:
> > >     It takes two minutes until the timer fires again
> > >
> > >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start
> > >         INFO: Server startup in 2357 ms
> > >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > logWarnIfNonZero
> > >         INFO: ClusterManager: detected 1 failed or restarted instances.
> > >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > clusterRecover
> > >         INFO: ClusterManager: Scanning for instance
> > > "DE064071352380642408"'s
> > > failed in-progress jobs.
> > >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > logWarnIfNonZero
> > >         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
> > >         08.11.2012 14:30:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > recoverMisfiredJobs
> > >         INFO: Handling 1 trigger(s) that missed their scheduled
> > fire-time.
> > >         08.11.2012 14:30:45
> timerPersisted.server.SchedulerBeanAutomated
> > > automaticTimeout
> > >         INFO: Automatic timeout occured
> > >
> > > 2) automatic and programmatic timeouts:
> > >     TomEE kill prevented the execution of five programmatic timeouts,
> > while
> > > server restart the first programmatic timeout causes an error and is
> > never
> > > executed
> > >
> > >         INFO: OpenWebBeans Container has started, it took 10 ms.
> > >         08.11.2012 16:59:02
> > > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> > >         org.apache.openejb.OpenEJBException: Deployment does not exist
> in
> > > this container. Deployment(id='SchedulerBeanPersisted'),
> Container(id='My
> > > Singleton Container')
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> > >                 at
> > >
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> > >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> > >                 at
> > >
> > >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> > >         08.11.2012 16:59:02
> > org.apache.openejb.assembler.classic.Assembler
> > > createApplication
> > >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
> > > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> > >         08.11.2012 16:59:02
> > > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> > >         org.apache.openejb.OpenEJBException: Deployment does not exist
> in
> > > this container. Deployment(id='SchedulerBeanPersisted'),
> Container(id='My
> > > Singleton Container')
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> > >                 at
> > >
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> > >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> > >                 at
> > >
> > >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> > >         08.11.2012 16:59:02
> > > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> > >         org.apache.openejb.OpenEJBException: Deployment does not exist
> in
> > > this container. Deployment(id='SchedulerBeanPersisted'),
> Container(id='My
> > > Singleton Container')
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> > >                 at
> > >
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> > >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> > >                 at
> > >
> > >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> > >         08.11.2012 16:59:02
> > > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >         WARNUNG: Failed to execute ejbTimeout on SchedulerBeanPersisted
> > > successfully within 1 attempts
> > >         08.11.2012 16:59:02
> > org.apache.openejb.assembler.classic.Assembler
> > > createApplication
> > >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
> > > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> > >         08.11.2012 16:59:02
> > org.apache.openejb.assembler.classic.Assembler
> > > createApplication
> > >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
> > > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> > >         08.11.2012 16:59:02
> > org.apache.openejb.assembler.classic.Assembler
> > > createApplication
> > >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
> > > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> > >         08.11.2012 16:59:02
> > org.apache.openejb.assembler.classic.Assembler
> > > createApplication
> > >         INFO: Deployed
> > >
> > >
> >
> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
> > >         08.11.2012 16:59:02
> timerPersisted.server.SchedulerBeanPersisted
> > > programmaticTimeout
> > >         INFO: Programmatic timeout occurred.
> > >
> > > 3) Having a look into the quartz database tables, I can see that
> JOB_DATA
> > > column of table QRTZ_TRIGGERS includes the, let me call it timer
> context.
> > >     This timer context includes serialized objects.
> > >     What I am wondering about is how you can garantee that the timer
> > events
> > > can be executed with an updated TomEE version that may include an
> update
> > of
> > > the serialzed objects?
> > >
> > > Best regards,
> > > Thomas
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
> > To unsubscribe from Use external database for persistent timer service,
> > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.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/Use-external-database-for-persistent-timer-service-tp4658321p4658497.html
> To unsubscribe from Use external database for persistent timer service,
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658529.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/Use-external-database-for-persistent-timer-service-tp4658321p4658531.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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>


jstackTomEE.txt (31K) <http://openejb.979440.n4.nabble.com/attachment/4658605/0/jstackTomEE.txt>




--
View this message in context: http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658605.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

if it hangs can you please take a thread dump at this moment (if you have a
jdk type in a console "jps" -> find Boostrap id then "jstack <id>") please?

*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*




2012/11/12 tschuler <th...@opentext.com>

> Hi Romain!
>
> Taking the snapshot from today (Monday 12) looks better but still not good
> enough I think.
>
> The following situation: An automticTimer is running and a programmatic
> timer is added (but yet not fired).
> End TomEE. Wait till trigger time of programmatic trigger passed. Start
> TomEE.
>
> è Startup sequence seems to hang, no access to SchedulerBeanPersisted.
>
> 12.11.2012 13:24:27 org.quartz.core.QuartzScheduler initialize
> INFO: Scheduler meta-data: Quartz Scheduler (v2.1.6) 'MyScheduler' with
> instanceId 'DE064071352723067406'
>   Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
>   NOT STARTED.
>   Currently in standby mode.
>   Number of jobs executed: 0
>   Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 4 threads.
>   Using job-store 'org.quartz.impl.jdbcjobstore.JobStoreCMT' - which
> supports persistence. and is clustered.
> 12.11.2012 13:24:27 org.quartz.impl.StdSchedulerFactory instantiate
> INFO: Quartz scheduler 'MyScheduler' initialized from an externally
> provided properties instance.
> 12.11.2012 13:24:27 org.quartz.impl.StdSchedulerFactory instantiate
> INFO: Quartz scheduler version: 2.1.6
> 12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport
> logWarnIfNonZero
> INFO: ClusterManager: detected 1 failed or restarted instances.
> 12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport
> clusterRecover
> INFO: ClusterManager: Scanning for instance "DE064071352722853574"'s
> failed in-progress jobs.
> 12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport
> logWarnIfNonZero
> INFO: ClusterManager: ......Freed 1 acquired trigger(s).
> 12.11.2012 13:24:27 org.quartz.core.QuartzScheduler start
> INFO: Scheduler MyScheduler_$_DE064071352723067406 started.
> 12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport
> recoverMisfiredJobs
> INFO: Handling 1 trigger(s) that missed their scheduled fire-time.
>
> All following startups of TomEE show the same behavior, but slightly
> different log messages at the end:
> […]
> 12.11.2012 13:45:03 org.quartz.impl.jdbcjobstore.JobStoreSupport
> logWarnIfNonZero
> INFO: ClusterManager: detected 1 failed or restarted instances.
> 12.11.2012 13:45:03 org.quartz.impl.jdbcjobstore.JobStoreSupport
> clusterRecover
> INFO: ClusterManager: Scanning for instance "DE064071352724225831"'s
> failed in-progress jobs.
> 12.11.2012 13:45:03 org.quartz.core.QuartzScheduler start
> INFO: Scheduler MyScheduler_$_DE064071352724303131 started.
> 12.11.2012 13:45:03 org.quartz.impl.jdbcjobstore.JobStoreSupport
> recoverMisfiredJobs
> INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
>
> A cleanup of the quartz tables is needed to get the application running
> again.
>
> Best regards,
>                 Thomas
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658497h17@n4.nabble.com]
> Sent: Freitag, 9. November 2012 15:30
> To: Thomas Schuler
> Subject: RE: Use external database for persistent timer service
>
> I pushed some stuff yesterday about 2 (well can be linked even if not
> direct) so it should be in the snapshot
> Le 9 nov. 2012 13:16, "tschuler" <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658497&i=0>> a écrit :
>
> > Hi Romain!
> >
> > About 1: It may be a config issue, but I don't think so - doesn't matter
> > right now.
> > About 2: If you have a solution for it, please let me know. Would be
> > included in a future snapshot, I think?
> > About 3: We need to be sure that timer issues using e.g. the actual TomEE
> > version can be executed using the next TomEE version.
> >                As there are serialized OpenEJB classes in the quartz
> > database, they may be incompatible with the class definition included in
> a
> > future TomEE version.
> >
> > Best regards,
> >                 Thomas
> >
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4658497&i=1>]
> > Sent: Donnerstag, 8. November 2012 22:38
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > about 1: maybe just a quartz config
> > about 2: looking into it, think i got why but thinking to the best
> > solution*
> > about 3: we can store it as we want. That said not sure it'd be used, if
> > you change your tomee instance you often reset some datas (and i think
> > these timers can be resetted in such a case, no?)
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/8 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>
> >
> > > Hi!
> > >
> > > I tried todays snapshot and it worked better if TomEE is running all
> the
> > > time.
> > > But in case of TomEE restart a few errors happen for persisted timers.
> > >
> > > 1) automatic timeout:
> > >     It takes two minutes until the timer fires again
> > >
> > >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start
> > >         INFO: Server startup in 2357 ms
> > >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > logWarnIfNonZero
> > >         INFO: ClusterManager: detected 1 failed or restarted instances.
> > >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > clusterRecover
> > >         INFO: ClusterManager: Scanning for instance
> > > "DE064071352380642408"'s
> > > failed in-progress jobs.
> > >         08.11.2012 14:29:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > logWarnIfNonZero
> > >         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
> > >         08.11.2012 14:30:45
> org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > recoverMisfiredJobs
> > >         INFO: Handling 1 trigger(s) that missed their scheduled
> > fire-time.
> > >         08.11.2012 14:30:45
> timerPersisted.server.SchedulerBeanAutomated
> > > automaticTimeout
> > >         INFO: Automatic timeout occured
> > >
> > > 2) automatic and programmatic timeouts:
> > >     TomEE kill prevented the execution of five programmatic timeouts,
> > while
> > > server restart the first programmatic timeout causes an error and is
> > never
> > > executed
> > >
> > >         INFO: OpenWebBeans Container has started, it took 10 ms.
> > >         08.11.2012 16:59:02
> > > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> > >         org.apache.openejb.OpenEJBException: Deployment does not exist
> in
> > > this container. Deployment(id='SchedulerBeanPersisted'),
> Container(id='My
> > > Singleton Container')
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> > >                 at
> > >
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> > >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> > >                 at
> > >
> > >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> > >         08.11.2012 16:59:02
> > org.apache.openejb.assembler.classic.Assembler
> > > createApplication
> > >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
> > > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> > >         08.11.2012 16:59:02
> > > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> > >         org.apache.openejb.OpenEJBException: Deployment does not exist
> in
> > > this container. Deployment(id='SchedulerBeanPersisted'),
> Container(id='My
> > > Singleton Container')
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> > >                 at
> > >
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> > >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> > >                 at
> > >
> > >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> > >         08.11.2012 16:59:02
> > > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> > >         org.apache.openejb.OpenEJBException: Deployment does not exist
> in
> > > this container. Deployment(id='SchedulerBeanPersisted'),
> Container(id='My
> > > Singleton Container')
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> > >                 at
> > >
> > >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> > >                 at
> > >
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> > >                 at
> org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> > >                 at
> > >
> > >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> > >         08.11.2012 16:59:02
> > > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> > >         WARNUNG: Failed to execute ejbTimeout on SchedulerBeanPersisted
> > > successfully within 1 attempts
> > >         08.11.2012 16:59:02
> > org.apache.openejb.assembler.classic.Assembler
> > > createApplication
> > >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
> > > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> > >         08.11.2012 16:59:02
> > org.apache.openejb.assembler.classic.Assembler
> > > createApplication
> > >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
> > > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> > >         08.11.2012 16:59:02
> > org.apache.openejb.assembler.classic.Assembler
> > > createApplication
> > >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
> > > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> > >         08.11.2012 16:59:02
> > org.apache.openejb.assembler.classic.Assembler
> > > createApplication
> > >         INFO: Deployed
> > >
> > >
> >
> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
> > >         08.11.2012 16:59:02
> timerPersisted.server.SchedulerBeanPersisted
> > > programmaticTimeout
> > >         INFO: Programmatic timeout occurred.
> > >
> > > 3) Having a look into the quartz database tables, I can see that
> JOB_DATA
> > > column of table QRTZ_TRIGGERS includes the, let me call it timer
> context.
> > >     This timer context includes serialized objects.
> > >     What I am wondering about is how you can garantee that the timer
> > events
> > > can be executed with an updated TomEE version that may include an
> update
> > of
> > > the serialzed objects?
> > >
> > > Best regards,
> > > Thomas
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
> > To unsubscribe from Use external database for persistent timer service,
> > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.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/Use-external-database-for-persistent-timer-service-tp4658321p4658497.html
> To unsubscribe from Use external database for persistent timer service,
> click here<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
> >.
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658529.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

Taking the snapshot from today (Monday 12) looks better but still not good enough I think.

The following situation: An automticTimer is running and a programmatic timer is added (but yet not fired).
End TomEE. Wait till trigger time of programmatic trigger passed. Start TomEE.

è Startup sequence seems to hang, no access to SchedulerBeanPersisted.

12.11.2012 13:24:27 org.quartz.core.QuartzScheduler initialize
INFO: Scheduler meta-data: Quartz Scheduler (v2.1.6) 'MyScheduler' with instanceId 'DE064071352723067406'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 4 threads.
  Using job-store 'org.quartz.impl.jdbcjobstore.JobStoreCMT' - which supports persistence. and is clustered.
12.11.2012 13:24:27 org.quartz.impl.StdSchedulerFactory instantiate
INFO: Quartz scheduler 'MyScheduler' initialized from an externally provided properties instance.
12.11.2012 13:24:27 org.quartz.impl.StdSchedulerFactory instantiate
INFO: Quartz scheduler version: 2.1.6
12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport logWarnIfNonZero
INFO: ClusterManager: detected 1 failed or restarted instances.
12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport clusterRecover
INFO: ClusterManager: Scanning for instance "DE064071352722853574"'s failed in-progress jobs.
12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport logWarnIfNonZero
INFO: ClusterManager: ......Freed 1 acquired trigger(s).
12.11.2012 13:24:27 org.quartz.core.QuartzScheduler start
INFO: Scheduler MyScheduler_$_DE064071352723067406 started.
12.11.2012 13:24:27 org.quartz.impl.jdbcjobstore.JobStoreSupport recoverMisfiredJobs
INFO: Handling 1 trigger(s) that missed their scheduled fire-time.

All following startups of TomEE show the same behavior, but slightly different log messages at the end:
[…]
12.11.2012 13:45:03 org.quartz.impl.jdbcjobstore.JobStoreSupport logWarnIfNonZero
INFO: ClusterManager: detected 1 failed or restarted instances.
12.11.2012 13:45:03 org.quartz.impl.jdbcjobstore.JobStoreSupport clusterRecover
INFO: ClusterManager: Scanning for instance "DE064071352724225831"'s failed in-progress jobs.
12.11.2012 13:45:03 org.quartz.core.QuartzScheduler start
INFO: Scheduler MyScheduler_$_DE064071352724303131 started.
12.11.2012 13:45:03 org.quartz.impl.jdbcjobstore.JobStoreSupport recoverMisfiredJobs
INFO: Handling 2 trigger(s) that missed their scheduled fire-time.

A cleanup of the quartz tables is needed to get the application running again.

Best regards,
                Thomas

From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658497h17@n4.nabble.com]
Sent: Freitag, 9. November 2012 15:30
To: Thomas Schuler
Subject: RE: Use external database for persistent timer service

I pushed some stuff yesterday about 2 (well can be linked even if not
direct) so it should be in the snapshot
Le 9 nov. 2012 13:16, "tschuler" <[hidden email]</user/SendEmail.jtp?type=node&node=4658497&i=0>> a écrit :

> Hi Romain!
>
> About 1: It may be a config issue, but I don't think so - doesn't matter
> right now.
> About 2: If you have a solution for it, please let me know. Would be
> included in a future snapshot, I think?
> About 3: We need to be sure that timer issues using e.g. the actual TomEE
> version can be executed using the next TomEE version.
>                As there are serialized OpenEJB classes in the quartz
> database, they may be incompatible with the class definition included in a
> future TomEE version.
>
> Best regards,
>                 Thomas
>
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=4658497&i=1>]
> Sent: Donnerstag, 8. November 2012 22:38
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> about 1: maybe just a quartz config
> about 2: looking into it, think i got why but thinking to the best
> solution*
> about 3: we can store it as we want. That said not sure it'd be used, if
> you change your tomee instance you often reset some datas (and i think
> these timers can be resetted in such a case, no?)
>
> *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*
>
>
>
>
> 2012/11/8 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>
>
> > Hi!
> >
> > I tried todays snapshot and it worked better if TomEE is running all the
> > time.
> > But in case of TomEE restart a few errors happen for persisted timers.
> >
> > 1) automatic timeout:
> >     It takes two minutes until the timer fires again
> >
> >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start
> >         INFO: Server startup in 2357 ms
> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> > logWarnIfNonZero
> >         INFO: ClusterManager: detected 1 failed or restarted instances.
> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> > clusterRecover
> >         INFO: ClusterManager: Scanning for instance
> > "DE064071352380642408"'s
> > failed in-progress jobs.
> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> > logWarnIfNonZero
> >         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
> >         08.11.2012 14:30:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> > recoverMisfiredJobs
> >         INFO: Handling 1 trigger(s) that missed their scheduled
> fire-time.
> >         08.11.2012 14:30:45 timerPersisted.server.SchedulerBeanAutomated
> > automaticTimeout
> >         INFO: Automatic timeout occured
> >
> > 2) automatic and programmatic timeouts:
> >     TomEE kill prevented the execution of five programmatic timeouts,
> while
> > server restart the first programmatic timeout causes an error and is
> never
> > executed
> >
> >         INFO: OpenWebBeans Container has started, it took 10 ms.
> >         08.11.2012 16:59:02
> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >         org.apache.openejb.OpenEJBException: Deployment does not exist in
> > this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> > Singleton Container')
> >                 at
> >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >                 at
> >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >                 at
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >                 at
> >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >         08.11.2012 16:59:02
> org.apache.openejb.assembler.classic.Assembler
> > createApplication
> >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> >         08.11.2012 16:59:02
> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >         org.apache.openejb.OpenEJBException: Deployment does not exist in
> > this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> > Singleton Container')
> >                 at
> >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >                 at
> >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >                 at
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >                 at
> >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >         08.11.2012 16:59:02
> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >         org.apache.openejb.OpenEJBException: Deployment does not exist in
> > this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> > Singleton Container')
> >                 at
> >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >                 at
> >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >                 at
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >                 at
> >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >         08.11.2012 16:59:02
> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >         WARNUNG: Failed to execute ejbTimeout on SchedulerBeanPersisted
> > successfully within 1 attempts
> >         08.11.2012 16:59:02
> org.apache.openejb.assembler.classic.Assembler
> > createApplication
> >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> >         08.11.2012 16:59:02
> org.apache.openejb.assembler.classic.Assembler
> > createApplication
> >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> >         08.11.2012 16:59:02
> org.apache.openejb.assembler.classic.Assembler
> > createApplication
> >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> >         08.11.2012 16:59:02
> org.apache.openejb.assembler.classic.Assembler
> > createApplication
> >         INFO: Deployed
> >
> >
> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
> >         08.11.2012 16:59:02 timerPersisted.server.SchedulerBeanPersisted
> > programmaticTimeout
> >         INFO: Programmatic timeout occurred.
> >
> > 3) Having a look into the quartz database tables, I can see that JOB_DATA
> > column of table QRTZ_TRIGGERS includes the, let me call it timer context.
> >     This timer context includes serialized objects.
> >     What I am wondering about is how you can garantee that the timer
> events
> > can be executed with an updated TomEE version that may include an update
> of
> > the serialzed objects?
> >
> > Best regards,
> > Thomas
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
> To unsubscribe from Use external database for persistent timer service,
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.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/Use-external-database-for-persistent-timer-service-tp4658321p4658497.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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/Use-external-database-for-persistent-timer-service-tp4658321p4658529.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

RE: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I pushed some stuff yesterday about 2 (well can be linked even if not
direct) so it should be in the snapshot
Le 9 nov. 2012 13:16, "tschuler" <th...@opentext.com> a écrit :

> Hi Romain!
>
> About 1: It may be a config issue, but I don't think so - doesn't matter
> right now.
> About 2: If you have a solution for it, please let me know. Would be
> included in a future snapshot, I think?
> About 3: We need to be sure that timer issues using e.g. the actual TomEE
> version can be executed using the next TomEE version.
>                As there are serialized OpenEJB classes in the quartz
> database, they may be incompatible with the class definition included in a
> future TomEE version.
>
> Best regards,
>                 Thomas
>
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658490h0@n4.nabble.com]
> Sent: Donnerstag, 8. November 2012 22:38
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> about 1: maybe just a quartz config
> about 2: looking into it, think i got why but thinking to the best
> solution*
> about 3: we can store it as we want. That said not sure it'd be used, if
> you change your tomee instance you often reset some datas (and i think
> these timers can be resetted in such a case, no?)
>
> *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*
>
>
>
>
> 2012/11/8 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>
>
> > Hi!
> >
> > I tried todays snapshot and it worked better if TomEE is running all the
> > time.
> > But in case of TomEE restart a few errors happen for persisted timers.
> >
> > 1) automatic timeout:
> >     It takes two minutes until the timer fires again
> >
> >         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start
> >         INFO: Server startup in 2357 ms
> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> > logWarnIfNonZero
> >         INFO: ClusterManager: detected 1 failed or restarted instances.
> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> > clusterRecover
> >         INFO: ClusterManager: Scanning for instance
> > "DE064071352380642408"'s
> > failed in-progress jobs.
> >         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> > logWarnIfNonZero
> >         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
> >         08.11.2012 14:30:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> > recoverMisfiredJobs
> >         INFO: Handling 1 trigger(s) that missed their scheduled
> fire-time.
> >         08.11.2012 14:30:45 timerPersisted.server.SchedulerBeanAutomated
> > automaticTimeout
> >         INFO: Automatic timeout occured
> >
> > 2) automatic and programmatic timeouts:
> >     TomEE kill prevented the execution of five programmatic timeouts,
> while
> > server restart the first programmatic timeout causes an error and is
> never
> > executed
> >
> >         INFO: OpenWebBeans Container has started, it took 10 ms.
> >         08.11.2012 16:59:02
> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >         org.apache.openejb.OpenEJBException: Deployment does not exist in
> > this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> > Singleton Container')
> >                 at
> >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >                 at
> >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >                 at
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >                 at
> >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >         08.11.2012 16:59:02
> org.apache.openejb.assembler.classic.Assembler
> > createApplication
> >         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> >         08.11.2012 16:59:02
> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >         org.apache.openejb.OpenEJBException: Deployment does not exist in
> > this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> > Singleton Container')
> >                 at
> >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >                 at
> >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >                 at
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >                 at
> >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >         08.11.2012 16:59:02
> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
> >         org.apache.openejb.OpenEJBException: Deployment does not exist in
> > this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> > Singleton Container')
> >                 at
> >
> >
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
> >                 at
> >
> >
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
> >                 at
> >
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> >                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >                 at
> >
> >
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >         08.11.2012 16:59:02
> > org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
> >         WARNUNG: Failed to execute ejbTimeout on SchedulerBeanPersisted
> > successfully within 1 attempts
> >         08.11.2012 16:59:02
> org.apache.openejb.assembler.classic.Assembler
> > createApplication
> >         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> >         08.11.2012 16:59:02
> org.apache.openejb.assembler.classic.Assembler
> > createApplication
> >         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
> > ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
> >         08.11.2012 16:59:02
> org.apache.openejb.assembler.classic.Assembler
> > createApplication
> >         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
> > ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
> >         08.11.2012 16:59:02
> org.apache.openejb.assembler.classic.Assembler
> > createApplication
> >         INFO: Deployed
> >
> >
> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
> >         08.11.2012 16:59:02 timerPersisted.server.SchedulerBeanPersisted
> > programmaticTimeout
> >         INFO: Programmatic timeout occurred.
> >
> > 3) Having a look into the quartz database tables, I can see that JOB_DATA
> > column of table QRTZ_TRIGGERS includes the, let me call it timer context.
> >     This timer context includes serialized objects.
> >     What I am wondering about is how you can garantee that the timer
> events
> > can be executed with an updated TomEE version that may include an update
> of
> > the serialzed objects?
> >
> > Best regards,
> > Thomas
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
> To unsubscribe from Use external database for persistent timer service,
> click here<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
> >.
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

About 1: It may be a config issue, but I don't think so - doesn't matter right now.
About 2: If you have a solution for it, please let me know. Would be included in a future snapshot, I think?
About 3: We need to be sure that timer issues using e.g. the actual TomEE version can be executed using the next TomEE version.
               As there are serialized OpenEJB classes in the quartz database, they may be incompatible with the class definition included in a future TomEE version.

Best regards,
                Thomas


From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658490h0@n4.nabble.com]
Sent: Donnerstag, 8. November 2012 22:38
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

about 1: maybe just a quartz config
about 2: looking into it, think i got why but thinking to the best solution*
about 3: we can store it as we want. That said not sure it'd be used, if
you change your tomee instance you often reset some datas (and i think
these timers can be resetted in such a case, no?)

*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*




2012/11/8 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658490&i=0>>

> Hi!
>
> I tried todays snapshot and it worked better if TomEE is running all the
> time.
> But in case of TomEE restart a few errors happen for persisted timers.
>
> 1) automatic timeout:
>     It takes two minutes until the timer fires again
>
>         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start
>         INFO: Server startup in 2357 ms
>         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> logWarnIfNonZero
>         INFO: ClusterManager: detected 1 failed or restarted instances.
>         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> clusterRecover
>         INFO: ClusterManager: Scanning for instance
> "DE064071352380642408"'s
> failed in-progress jobs.
>         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> logWarnIfNonZero
>         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
>         08.11.2012 14:30:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> recoverMisfiredJobs
>         INFO: Handling 1 trigger(s) that missed their scheduled fire-time.
>         08.11.2012 14:30:45 timerPersisted.server.SchedulerBeanAutomated
> automaticTimeout
>         INFO: Automatic timeout occured
>
> 2) automatic and programmatic timeouts:
>     TomEE kill prevented the execution of five programmatic timeouts, while
> server restart the first programmatic timeout causes an error and is never
> executed
>
>         INFO: OpenWebBeans Container has started, it took 10 ms.
>         08.11.2012 16:59:02
> org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>         org.apache.openejb.OpenEJBException: Deployment does not exist in
> this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> Singleton Container')
>                 at
>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>                 at
>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>                 at
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>                 at
>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>         08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
> createApplication
>         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
> ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
>         08.11.2012 16:59:02
> org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>         org.apache.openejb.OpenEJBException: Deployment does not exist in
> this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> Singleton Container')
>                 at
>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>                 at
>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>                 at
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>                 at
>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>         08.11.2012 16:59:02
> org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>         org.apache.openejb.OpenEJBException: Deployment does not exist in
> this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> Singleton Container')
>                 at
>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>                 at
>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>                 at
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>                 at
>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>         08.11.2012 16:59:02
> org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>         WARNUNG: Failed to execute ejbTimeout on SchedulerBeanPersisted
> successfully within 1 attempts
>         08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
> createApplication
>         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
> ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
>         08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
> createApplication
>         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
> ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
>         08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
> createApplication
>         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
> ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
>         08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
> createApplication
>         INFO: Deployed
>
> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
>         08.11.2012 16:59:02 timerPersisted.server.SchedulerBeanPersisted
> programmaticTimeout
>         INFO: Programmatic timeout occurred.
>
> 3) Having a look into the quartz database tables, I can see that JOB_DATA
> column of table QRTZ_TRIGGERS includes the, let me call it timer context.
>     This timer context includes serialized objects.
>     What I am wondering about is how you can garantee that the timer events
> can be executed with an updated TomEE version that may include an update of
> the serialzed objects?
>
> Best regards,
> Thomas
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.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/Use-external-database-for-persistent-timer-service-tp4658321p4658490.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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/Use-external-database-for-persistent-timer-service-tp4658321p4658495.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
about 1: maybe just a quartz config
about 2: looking into it, think i got why but thinking to the best solution*
about 3: we can store it as we want. That said not sure it'd be used, if
you change your tomee instance you often reset some datas (and i think
these timers can be resetted in such a case, no?)

*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*




2012/11/8 tschuler <th...@opentext.com>

> Hi!
>
> I tried todays snapshot and it worked better if TomEE is running all the
> time.
> But in case of TomEE restart a few errors happen for persisted timers.
>
> 1) automatic timeout:
>     It takes two minutes until the timer fires again
>
>         08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start
>         INFO: Server startup in 2357 ms
>         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> logWarnIfNonZero
>         INFO: ClusterManager: detected 1 failed or restarted instances.
>         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> clusterRecover
>         INFO: ClusterManager: Scanning for instance
> "DE064071352380642408"'s
> failed in-progress jobs.
>         08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> logWarnIfNonZero
>         INFO: ClusterManager: ......Freed 1 acquired trigger(s).
>         08.11.2012 14:30:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
> recoverMisfiredJobs
>         INFO: Handling 1 trigger(s) that missed their scheduled fire-time.
>         08.11.2012 14:30:45 timerPersisted.server.SchedulerBeanAutomated
> automaticTimeout
>         INFO: Automatic timeout occured
>
> 2) automatic and programmatic timeouts:
>     TomEE kill prevented the execution of five programmatic timeouts, while
> server restart the first programmatic timeout causes an error and is never
> executed
>
>         INFO: OpenWebBeans Container has started, it took 10 ms.
>         08.11.2012 16:59:02
> org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>         org.apache.openejb.OpenEJBException: Deployment does not exist in
> this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> Singleton Container')
>                 at
>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>                 at
>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>                 at
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>                 at
>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>         08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
> createApplication
>         INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
> ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
>         08.11.2012 16:59:02
> org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>         org.apache.openejb.OpenEJBException: Deployment does not exist in
> this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> Singleton Container')
>                 at
>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>                 at
>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>                 at
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>                 at
>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>         08.11.2012 16:59:02
> org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>         WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
>         org.apache.openejb.OpenEJBException: Deployment does not exist in
> this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
> Singleton Container')
>                 at
>
> org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
>                 at
>
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
>                 at
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
>                 at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>                 at
>
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>         08.11.2012 16:59:02
> org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
>         WARNUNG: Failed to execute ejbTimeout on SchedulerBeanPersisted
> successfully within 1 attempts
>         08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
> createApplication
>         INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
> ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
>         08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
> createApplication
>         INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
> ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
>         08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
> createApplication
>         INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
> ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
>         08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
> createApplication
>         INFO: Deployed
>
> Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
>         08.11.2012 16:59:02 timerPersisted.server.SchedulerBeanPersisted
> programmaticTimeout
>         INFO: Programmatic timeout occurred.
>
> 3) Having a look into the quartz database tables, I can see that JOB_DATA
> column of table QRTZ_TRIGGERS includes the, let me call it timer context.
>     This timer context includes serialized objects.
>     What I am wondering about is how you can garantee that the timer events
> can be executed with an updated TomEE version that may include an update of
> the serialzed objects?
>
> Best regards,
> Thomas
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi!

I tried todays snapshot and it worked better if TomEE is running all the
time.
But in case of TomEE restart a few errors happen for persisted timers.

1) automatic timeout:
    It takes two minutes until the timer fires again 

        08.11.2012 14:28:46 org.apache.catalina.startup.Catalina start
        INFO: Server startup in 2357 ms
        08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
logWarnIfNonZero
        INFO: ClusterManager: detected 1 failed or restarted instances.
        08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
clusterRecover
        INFO: ClusterManager: Scanning for instance "DE064071352380642408"'s
failed in-progress jobs.
        08.11.2012 14:29:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
logWarnIfNonZero
        INFO: ClusterManager: ......Freed 1 acquired trigger(s).
        08.11.2012 14:30:45 org.quartz.impl.jdbcjobstore.JobStoreSupport
recoverMisfiredJobs
        INFO: Handling 1 trigger(s) that missed their scheduled fire-time.
        08.11.2012 14:30:45 timerPersisted.server.SchedulerBeanAutomated
automaticTimeout
        INFO: Automatic timeout occured

2) automatic and programmatic timeouts:
    TomEE kill prevented the execution of five programmatic timeouts, while
server restart the first programmatic timeout causes an error and is never
executed

        INFO: OpenWebBeans Container has started, it took 10 ms.
        08.11.2012 16:59:02
org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
        WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
        org.apache.openejb.OpenEJBException: Deployment does not exist in
this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
Singleton Container')
	        at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
        	at
org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
	        at
org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
	        at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
	        at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
        08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
createApplication
        INFO: Created Ejb(deployment-id=SchedulerBeanAutomated,
ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
        08.11.2012 16:59:02
org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
        WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
        org.apache.openejb.OpenEJBException: Deployment does not exist in
this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
Singleton Container')
	        at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
	        at
org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
	        at
org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
	        at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
	        at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
        08.11.2012 16:59:02
org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
        WARNUNG: Exception from ejbTimeout on SchedulerBeanPersisted
        org.apache.openejb.OpenEJBException: Deployment does not exist in
this container. Deployment(id='SchedulerBeanPersisted'), Container(id='My
Singleton Container')
	        at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:180)
	        at
org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:552)
	        at
org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
	        at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
	        at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
        08.11.2012 16:59:02
org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
        WARNUNG: Failed to execute ejbTimeout on SchedulerBeanPersisted
successfully within 1 attempts
        08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
createApplication
        INFO: Created Ejb(deployment-id=SchedulerBeanPersisted,
ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
        08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
createApplication
        INFO: Started Ejb(deployment-id=SchedulerBeanAutomated,
ejb-name=SchedulerBeanAutomated, container=My Singleton Container)
        08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
createApplication
        INFO: Started Ejb(deployment-id=SchedulerBeanPersisted,
ejb-name=SchedulerBeanPersisted, container=My Singleton Container)
        08.11.2012 16:59:02 org.apache.openejb.assembler.classic.Assembler
createApplication
        INFO: Deployed
Application(path=C:\Java\tomee-examples\tomee-timerPersisted\webapps\timerPersisted)
        08.11.2012 16:59:02 timerPersisted.server.SchedulerBeanPersisted
programmaticTimeout
        INFO: Programmatic timeout occurred.

3) Having a look into the quartz database tables, I can see that JOB_DATA
column of table QRTZ_TRIGGERS includes the, let me call it timer context.
    This timer context includes serialized objects.
    What I am wondering about is how you can garantee that the timer events
can be executed with an updated TomEE version that may include an update of
the serialzed objects?

Best regards,
Thomas



--
View this message in context: http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658484.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
yep, https://issues.apache.org/jira/browse/OPENEJB-1930

i think it was working only for @Schedule methods (internal timers). that's
why the jira is labelled this way

*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*




2012/11/7 tschuler <th...@opentext.com>

> Hi Romain!
>
> Can you please give me a link to the created JIRA?
>
> Best regards,
>                 Thomas
>
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658417h37@n4.nabble.com]
> Sent: Mittwoch, 7. November 2012 09:46
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> think it was a not supported feature (bug ;))
>
> and snapshot is available here
>
> https://repository.apache.org/content/groups/snapshots/org/apache/openejb/apache-tomee/1.5.1-SNAPSHOT/
> (check
> the date on the right)
>
> o opened a jira for this feature on 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*
>
>
>
>
> 2012/11/7 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658417&i=0>>
>
> > Hi Romain!
> >
> > I'm not familiar with TomEE so far.
> > First of all: Is my observation a bug or am I doing something wrong?
> > How will I know of the next snapshot, when is it planned to be ready and
> > how can I get it?
> >
> > Best regards,
> >                 Thomas
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4658417&i=1>]
> > Sent: Mittwoch, 7. November 2012 01:35
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > Hi,
> >
> > think you should test with the next snapshot ;)
> >
> > (updated a bit the trunk regarding this usage)
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/6 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4658410&i=0>>
> >
> > > Hi Romain!
> > >
> > > Attached the packed eclipse project.
> > > Please check README.txt how to adapt to your local system.
> > >
> > > It includes a simple example "Timer" demonstrating a scheduled bean
> > > without persistence.
> > >
> > > The example "Timer (persisted)" should demonstrate a persisted
> scheduled
> > > bean.
> > > This does only work for the automated timeout - it still runs after
> TomEE
> > > restart.
> > > The programmatic timeout can be added but is never executed but shows
> the
> > > described error message.
> > >
> > > Hope that helps.
> > > Feel free to contact me if you need additional information.
> > >
> > > Best regards,
> > >                 Thomas
> > >
> > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > [hidden email]</user/SendEmail.jtp?type=node&node=4658410&i=1>]
> > > Sent: Dienstag, 6. November 2012 14:19
> > > To: Thomas Schuler
> > > Subject: Re: Use external database for persistent timer service
> > >
> > > Hi,
> > >
> > > yes Romain ;)
> > >
> > >
> > > Don't know Bruno i think
> > >
> > > Ant is fine too, what i meant is sthg improtable in an IDE and
> buildable
> > in
> > > command line
> > >
> > > thks
> > >
> > > *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*
> > >
> > >
> > >
> > >
> > > 2012/11/6 tschuler <[hidden
> > > email]</user/SendEmail.jtp?type=node&node=4658393&i=0>>
> > >
> > > > Hi!
> > > >
> > > > Sorry to respond once more:
> > > > I can provide you an eclipse project instead.
> > > > It includes an ant task for building and deploying the example by
> > copying
> > > > a TomEE 1.5 installation and adapting it for executing the example.
> > > > Would that help?
> > > >
> > > > Best regards,
> > > >                 Thomas
> > > >
> > > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > > [hidden email]</user/SendEmail.jtp?type=node&node=4658393&i=1>]
> > > > Sent: Montag, 5. November 2012 17:49
> > > > To: Thomas Schuler
> > > > Subject: Re: Use external database for persistent timer service
> > > >
> > > > Hi,
> > > >
> > > > thanks for it but is it possible to share a maven project (really
> > easier
> > > > for us to work on it since these days are really busy)
> > > >
> > > > *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*
> > > >
> > > >
> > > >
> > > >
> > > > 2012/11/5 tschuler <[hidden
> > > > email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
> > > >
> > > > > Hi!
> > > > >
> > > > > Added a few files for reproducing  the problem:
> > > > > SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like
> the
> > > > > example in the JavaEE6 Tutorial stripped down to the
> programmatically
> > > > > inserted timer.
> > > > > AddProgrammaticTimer adds the programmatic timer.
> > > > > Tomee.xml shows the datasource definition.
> > > > > Application.properties (deployed to WEB-INF directory) shows the
> > > > > definition of the used quartz scheduler.
> > > > > Tables_sqlServer.sql show the SQL script provided from Quartz to
> > > generate
> > > > > the according tables for a MSSQL database.
> > > > >
> > > > > Do you need more information?
> > > > >
> > > > > Best regards,
> > > > >         Thomas
> > > > >
> > > > > -----
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > > > [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> > > > > Sent: Montag, 5. November 2012 16:27
> > > > > To: Thomas Schuler
> > > > > Subject: Re: Use external database for persistent timer service
> > > > >
> > > > > yeah, was asking to a sample to have a look locally
> > > > >
> > > > > thks
> > > > >
> > > > > *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*
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 2012/11/5 tschuler <[hidden email]>
> > > > >
> > > > > > Hi!
> > > > > >
> > > > > > What do you mean with reproduce?
> > > > > > If you want, I can provide you a simple example that doesn't
> work.
> > > > > >
> > > > > > Best regards,
> > > > > >                 Thomas
> > > > > >
> > > > > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > > > > [hidden email]]
> > > > > > Sent: Montag, 5. November 2012 16:18
> > > > > > To: Thomas Schuler
> > > > > > Subject: Re: Use external database for persistent timer service
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > can you reproduce it?
> > > > > >
> > > > > > normally timeoutMethod can't be null
> > > > > >
> > > > > > *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*
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > 2012/11/5 tschuler <[hidden
> > > > > > email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> > > > > >
> > > > > > > Hi!
> > > > > > >
> > > > > > > I successfully configured tomee for using an external database
> to
> > > > > enable
> > > > > > a
> > > > > > > persistent timer service.
> > > > > > > I tried the TimerSessionBean example within the JavaEE6
> Tutorial
> > > > > > > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > > > > > > The quartz database tables get the job informations, but I
> face a
> > > > > problem
> > > > > > > with programmatically added timeouts:
> > > > > > > They don't seem to be executed, about 90 seconds after the
> > trigger
> > > > time
> > > > > > the
> > > > > > > following message is written to the log file:
> > > > > > >
> > > > > > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > > > > > recoverMisfiredJobs
> > > > > > > INFO: Handling 2 trigger(s) that missed their scheduled
> > fire-time.
> > > > > > > [Timestamp]
> > > > org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > > > > > > manage
> > > > > > > SCHWERWIEGEND: MisfireHandler: Error handling misfires:
> Couldn't
> > > > store
> > > > > > > trigger
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > > > > > > org.quartz.JobPersistenceException: Couldn't store trigger
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See
> > > nested
> > > > > > > exception: java.lang.NullPointerException]
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > > > > > > Caused by: java.lang.NullPointerException
> > > > > > >         at
> > > > > > >
> > > >
> org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> > > > > > >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
> > > > Source)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > > > > >         at
> > > > > > >
> > > >
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > > > > >         at
> > > > > > >
> > > > >
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > > > >         at
> > > > > > >
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > > > >         at
> > > > > > >
> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > > > > >         at java.util.HashMap.writeObject(HashMap.java:1001)
> > > > > > >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
> > > > Source)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > > > > >         at
> > > > > > >
> > > >
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > > > > >         at
> > > > > > >
> > > > >
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > > > >         at
> > > > > > >
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> > > > > > >         at
> > > > > > >
> > > > >
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > > > >         at
> > > > > > >
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > > > >         at
> > > > > > >
> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> > > > > > >         ... 5 more
> > > > > > >
> > > > > > > Having a look into TimerData.java shows that timeoutMethod
> seems
> > to
> > > > be
> > > > > > > null.
> > > > > > >
> > > > > > > What must be done to get the programmtic timeout running?
> > > > > > >
> > > > > > > Best regards,
> > > > > > > Thomas
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > View this message in context:
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> > > > > > To unsubscribe from Use external database for persistent timer
> > > service,
> > > > > > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> > > > > To unsubscribe from Use external database for persistent timer
> > service,
> > > > > click here.
> > > > > NAML
> > > > >
> > > > >
> > > > > SchedulerBeanPersisted.java (1K) <
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> > > > > >
> > > > > SchedulerBeanPersistedRemote.java (230 bytes) <
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> > > > > >
> > > > > AddProgrammaticTimer.java (1K) <
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> > > > > >
> > > > > tomee.xml (654 bytes) <
> > > > > http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml
> >
> > > > > application.properties (1K) <
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> > > > > >
> > > > > tables_sqlServer.sql (14K) <
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
> > > > To unsubscribe from Use external database for persistent timer
> service,
> > > > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.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/Use-external-database-for-persistent-timer-service-tp4658321p4658393.html
> > > To unsubscribe from Use external database for persistent timer service,
> > > 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
> > > >
> > >
> > >
> > > PS_TOMEE.zip (1M) <
> > > http://openejb.979440.n4.nabble.com/attachment/4658403/0/PS_TOMEE.zip>
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658403.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/Use-external-database-for-persistent-timer-service-tp4658321p4658410.html
> > To unsubscribe from Use external database for persistent timer service,
> > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658416.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/Use-external-database-for-persistent-timer-service-tp4658321p4658417.html
> To unsubscribe from Use external database for persistent timer service,
> click here<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
> >.
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658418.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

Can you please give me a link to the created JIRA?

Best regards,
                Thomas


From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658417h37@n4.nabble.com]
Sent: Mittwoch, 7. November 2012 09:46
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

think it was a not supported feature (bug ;))

and snapshot is available here
https://repository.apache.org/content/groups/snapshots/org/apache/openejb/apache-tomee/1.5.1-SNAPSHOT/
(check
the date on the right)

o opened a jira for this feature on 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*




2012/11/7 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658417&i=0>>

> Hi Romain!
>
> I'm not familiar with TomEE so far.
> First of all: Is my observation a bug or am I doing something wrong?
> How will I know of the next snapshot, when is it planned to be ready and
> how can I get it?
>
> Best regards,
>                 Thomas
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=4658417&i=1>]
> Sent: Mittwoch, 7. November 2012 01:35
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> Hi,
>
> think you should test with the next snapshot ;)
>
> (updated a bit the trunk regarding this usage)
>
> *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*
>
>
>
>
> 2012/11/6 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658410&i=0>>
>
> > Hi Romain!
> >
> > Attached the packed eclipse project.
> > Please check README.txt how to adapt to your local system.
> >
> > It includes a simple example "Timer" demonstrating a scheduled bean
> > without persistence.
> >
> > The example "Timer (persisted)" should demonstrate a persisted scheduled
> > bean.
> > This does only work for the automated timeout - it still runs after TomEE
> > restart.
> > The programmatic timeout can be added but is never executed but shows the
> > described error message.
> >
> > Hope that helps.
> > Feel free to contact me if you need additional information.
> >
> > Best regards,
> >                 Thomas
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4658410&i=1>]
> > Sent: Dienstag, 6. November 2012 14:19
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > Hi,
> >
> > yes Romain ;)
> >
> >
> > Don't know Bruno i think
> >
> > Ant is fine too, what i meant is sthg improtable in an IDE and buildable
> in
> > command line
> >
> > thks
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/6 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4658393&i=0>>
> >
> > > Hi!
> > >
> > > Sorry to respond once more:
> > > I can provide you an eclipse project instead.
> > > It includes an ant task for building and deploying the example by
> copying
> > > a TomEE 1.5 installation and adapting it for executing the example.
> > > Would that help?
> > >
> > > Best regards,
> > >                 Thomas
> > >
> > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > [hidden email]</user/SendEmail.jtp?type=node&node=4658393&i=1>]
> > > Sent: Montag, 5. November 2012 17:49
> > > To: Thomas Schuler
> > > Subject: Re: Use external database for persistent timer service
> > >
> > > Hi,
> > >
> > > thanks for it but is it possible to share a maven project (really
> easier
> > > for us to work on it since these days are really busy)
> > >
> > > *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*
> > >
> > >
> > >
> > >
> > > 2012/11/5 tschuler <[hidden
> > > email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
> > >
> > > > Hi!
> > > >
> > > > Added a few files for reproducing  the problem:
> > > > SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> > > > example in the JavaEE6 Tutorial stripped down to the programmatically
> > > > inserted timer.
> > > > AddProgrammaticTimer adds the programmatic timer.
> > > > Tomee.xml shows the datasource definition.
> > > > Application.properties (deployed to WEB-INF directory) shows the
> > > > definition of the used quartz scheduler.
> > > > Tables_sqlServer.sql show the SQL script provided from Quartz to
> > generate
> > > > the according tables for a MSSQL database.
> > > >
> > > > Do you need more information?
> > > >
> > > > Best regards,
> > > >         Thomas
> > > >
> > > > -----
> > > >
> > > >
> > > >
> > > >
> > > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > > [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> > > > Sent: Montag, 5. November 2012 16:27
> > > > To: Thomas Schuler
> > > > Subject: Re: Use external database for persistent timer service
> > > >
> > > > yeah, was asking to a sample to have a look locally
> > > >
> > > > thks
> > > >
> > > > *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*
> > > >
> > > >
> > > >
> > > >
> > > > 2012/11/5 tschuler <[hidden email]>
> > > >
> > > > > Hi!
> > > > >
> > > > > What do you mean with reproduce?
> > > > > If you want, I can provide you a simple example that doesn't work.
> > > > >
> > > > > Best regards,
> > > > >                 Thomas
> > > > >
> > > > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > > > [hidden email]]
> > > > > Sent: Montag, 5. November 2012 16:18
> > > > > To: Thomas Schuler
> > > > > Subject: Re: Use external database for persistent timer service
> > > > >
> > > > > Hi,
> > > > >
> > > > > can you reproduce it?
> > > > >
> > > > > normally timeoutMethod can't be null
> > > > >
> > > > > *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*
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 2012/11/5 tschuler <[hidden
> > > > > email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> > > > >
> > > > > > Hi!
> > > > > >
> > > > > > I successfully configured tomee for using an external database to
> > > > enable
> > > > > a
> > > > > > persistent timer service.
> > > > > > I tried the TimerSessionBean example within the JavaEE6 Tutorial
> > > > > > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > > > > > The quartz database tables get the job informations, but I face a
> > > > problem
> > > > > > with programmatically added timeouts:
> > > > > > They don't seem to be executed, about 90 seconds after the
> trigger
> > > time
> > > > > the
> > > > > > following message is written to the log file:
> > > > > >
> > > > > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > > > > recoverMisfiredJobs
> > > > > > INFO: Handling 2 trigger(s) that missed their scheduled
> fire-time.
> > > > > > [Timestamp]
> > > org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > > > > > manage
> > > > > > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't
> > > store
> > > > > > trigger
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > > > > > org.quartz.JobPersistenceException: Couldn't store trigger
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See
> > nested
> > > > > > exception: java.lang.NullPointerException]
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > > > > > Caused by: java.lang.NullPointerException
> > > > > >         at
> > > > > >
> > > org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> > > > > >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
> > > Source)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > > > >         at
> > > > > >
> > > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > > > >         at
> > > > > >
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > > >         at
> > > > > >
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > > >         at
> > > > > >
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > > > >         at java.util.HashMap.writeObject(HashMap.java:1001)
> > > > > >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
> > > Source)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > > > >         at
> > > > > >
> > > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > > > >         at
> > > > > >
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > > >         at
> > > > > >
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> > > > > >         at
> > > > > >
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > > >         at
> > > > > >
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > > >         at
> > > > > >
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> > > > > >         ... 5 more
> > > > > >
> > > > > > Having a look into TimerData.java shows that timeoutMethod seems
> to
> > > be
> > > > > > null.
> > > > > >
> > > > > > What must be done to get the programmtic timeout running?
> > > > > >
> > > > > > Best regards,
> > > > > > Thomas
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > View this message in context:
> > > > > >
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> > > > > To unsubscribe from Use external database for persistent timer
> > service,
> > > > > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> > > > To unsubscribe from Use external database for persistent timer
> service,
> > > > click here.
> > > > NAML
> > > >
> > > >
> > > > SchedulerBeanPersisted.java (1K) <
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> > > > >
> > > > SchedulerBeanPersistedRemote.java (230 bytes) <
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> > > > >
> > > > AddProgrammaticTimer.java (1K) <
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> > > > >
> > > > tomee.xml (654 bytes) <
> > > > http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> > > > application.properties (1K) <
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> > > > >
> > > > tables_sqlServer.sql (14K) <
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
> > > To unsubscribe from Use external database for persistent timer service,
> > > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.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/Use-external-database-for-persistent-timer-service-tp4658321p4658393.html
> > To unsubscribe from Use external database for persistent timer service,
> > 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
> > >
> >
> >
> > PS_TOMEE.zip (1M) <
> > http://openejb.979440.n4.nabble.com/attachment/4658403/0/PS_TOMEE.zip>
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658403.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/Use-external-database-for-persistent-timer-service-tp4658321p4658410.html
> To unsubscribe from Use external database for persistent timer service,
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658416.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/Use-external-database-for-persistent-timer-service-tp4658321p4658417.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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/Use-external-database-for-persistent-timer-service-tp4658321p4658418.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Henning Blohm <he...@gmail.com>.
ja, das sieht wirklich vielversprechend aus,

On 11/06/2012 02:17 PM, Romain Manni-Bucau wrote:
> Hi,
>
> yes Romain ;)
>
>
> Don't know Bruno i think
>
> Ant is fine too, what i meant is sthg improtable in an IDE and buildable in
> command line
>
> thks
>
> *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*
>
>
>
>
> 2012/11/6 tschuler <th...@opentext.com>
>
>> Hi!
>>
>> Sorry to respond once more:
>> I can provide you an eclipse project instead.
>> It includes an ant task for building and deploying the example by copying
>> a TomEE 1.5 installation and adapting it for executing the example.
>> Would that help?
>>
>> Best regards,
>>                  Thomas
>>
>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
>> ml-node+s979440n4658382h52@n4.nabble.com]
>> Sent: Montag, 5. November 2012 17:49
>> To: Thomas Schuler
>> Subject: Re: Use external database for persistent timer service
>>
>> Hi,
>>
>> thanks for it but is it possible to share a maven project (really easier
>> for us to work on it since these days are really busy)
>>
>> *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*
>>
>>
>>
>>
>> 2012/11/5 tschuler <[hidden
>> email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
>>
>>> Hi!
>>>
>>> Added a few files for reproducing  the problem:
>>> SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
>>> example in the JavaEE6 Tutorial stripped down to the programmatically
>>> inserted timer.
>>> AddProgrammaticTimer adds the programmatic timer.
>>> Tomee.xml shows the datasource definition.
>>> Application.properties (deployed to WEB-INF directory) shows the
>>> definition of the used quartz scheduler.
>>> Tables_sqlServer.sql show the SQL script provided from Quartz to generate
>>> the according tables for a MSSQL database.
>>>
>>> Do you need more information?
>>>
>>> Best regards,
>>>          Thomas
>>>
>>> -----
>>>
>>>
>>>
>>>
>>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
>>> [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
>>> Sent: Montag, 5. November 2012 16:27
>>> To: Thomas Schuler
>>> Subject: Re: Use external database for persistent timer service
>>>
>>> yeah, was asking to a sample to have a look locally
>>>
>>> thks
>>>
>>> *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*
>>>
>>>
>>>
>>>
>>> 2012/11/5 tschuler <[hidden email]>
>>>
>>>> Hi!
>>>>
>>>> What do you mean with reproduce?
>>>> If you want, I can provide you a simple example that doesn't work.
>>>>
>>>> Best regards,
>>>>                  Thomas
>>>>
>>>> From: Romain Manni-Bucau [via OpenEJB] [mailto:
>>>> [hidden email]]
>>>> Sent: Montag, 5. November 2012 16:18
>>>> To: Thomas Schuler
>>>> Subject: Re: Use external database for persistent timer service
>>>>
>>>> Hi,
>>>>
>>>> can you reproduce it?
>>>>
>>>> normally timeoutMethod can't be null
>>>>
>>>> *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*
>>>>
>>>>
>>>>
>>>>
>>>> 2012/11/5 tschuler <[hidden
>>>> email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
>>>>
>>>>> Hi!
>>>>>
>>>>> I successfully configured tomee for using an external database to
>>> enable
>>>> a
>>>>> persistent timer service.
>>>>> I tried the TimerSessionBean example within the JavaEE6 Tutorial
>>>>> (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
>>>>> The quartz database tables get the job informations, but I face a
>>> problem
>>>>> with programmatically added timeouts:
>>>>> They don't seem to be executed, about 90 seconds after the trigger
>> time
>>>> the
>>>>> following message is written to the log file:
>>>>>
>>>>> [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
>>>>> recoverMisfiredJobs
>>>>> INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
>>>>> [Timestamp]
>> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
>>>>> manage
>>>>> SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't
>> store
>>>>> trigger
>>>>>
>>>>>
>> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
>>>>> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
>>>>> org.quartz.JobPersistenceException: Couldn't store trigger
>>>>>
>>>>>
>> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
>>>>> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
>>>>> exception: java.lang.NullPointerException]
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
>>>>> Caused by: java.lang.NullPointerException
>>>>>          at
>>>>>
>> org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
>>>>>          at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
>> Source)
>>>>>          at
>>>>>
>>>>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>          at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>          at
>>>>>
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>>>>>          at
>>>>>
>>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
>>>>>          at
>>>>>
>>>>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>>>>>          at
>>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>>>>>          at
>>>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
>>>>>          at java.util.HashMap.writeObject(HashMap.java:1001)
>>>>>          at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
>> Source)
>>>>>          at
>>>>>
>>>>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>          at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>          at
>>>>>
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>>>>>          at
>>>>>
>>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
>>>>>          at
>>>>>
>>>>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>>>>>          at
>>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>>>>>          at
>>>>>
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
>>>>>          at
>>>>>
>>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
>>>>>          at
>>>>>
>>>>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>>>>>          at
>>>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>>>>>          at
>>>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
>>>>>          at
>>>>>
>>>>>
>> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
>>>>>          ... 5 more
>>>>>
>>>>> Having a look into TimerData.java shows that timeoutMethod seems to
>> be
>>>>> null.
>>>>>
>>>>> What must be done to get the programmtic timeout running?
>>>>>
>>>>> Best regards,
>>>>> Thomas
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
>>>> To unsubscribe from Use external database for persistent timer service,
>>>> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
>>> To unsubscribe from Use external database for persistent timer service,
>>> click here.
>>> NAML
>>>
>>>
>>> SchedulerBeanPersisted.java (1K) <
>>>
>> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
>>> SchedulerBeanPersistedRemote.java (230 bytes) <
>>>
>> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
>>> AddProgrammaticTimer.java (1K) <
>>>
>> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
>>> tomee.xml (654 bytes) <
>>> http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
>>> application.properties (1K) <
>>>
>> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
>>> tables_sqlServer.sql (14K) <
>>>
>> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>>
>> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
>> To unsubscribe from Use external database for persistent timer service,
>> click here<
>> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
>>> .
>> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>


Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
think it was a not supported feature (bug ;))

and snapshot is available here
https://repository.apache.org/content/groups/snapshots/org/apache/openejb/apache-tomee/1.5.1-SNAPSHOT/
(check
the date on the right)

o opened a jira for this feature on 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*




2012/11/7 tschuler <th...@opentext.com>

> Hi Romain!
>
> I'm not familiar with TomEE so far.
> First of all: Is my observation a bug or am I doing something wrong?
> How will I know of the next snapshot, when is it planned to be ready and
> how can I get it?
>
> Best regards,
>                 Thomas
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658410h20@n4.nabble.com]
> Sent: Mittwoch, 7. November 2012 01:35
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> Hi,
>
> think you should test with the next snapshot ;)
>
> (updated a bit the trunk regarding this usage)
>
> *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*
>
>
>
>
> 2012/11/6 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658410&i=0>>
>
> > Hi Romain!
> >
> > Attached the packed eclipse project.
> > Please check README.txt how to adapt to your local system.
> >
> > It includes a simple example "Timer" demonstrating a scheduled bean
> > without persistence.
> >
> > The example "Timer (persisted)" should demonstrate a persisted scheduled
> > bean.
> > This does only work for the automated timeout - it still runs after TomEE
> > restart.
> > The programmatic timeout can be added but is never executed but shows the
> > described error message.
> >
> > Hope that helps.
> > Feel free to contact me if you need additional information.
> >
> > Best regards,
> >                 Thomas
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4658410&i=1>]
> > Sent: Dienstag, 6. November 2012 14:19
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > Hi,
> >
> > yes Romain ;)
> >
> >
> > Don't know Bruno i think
> >
> > Ant is fine too, what i meant is sthg improtable in an IDE and buildable
> in
> > command line
> >
> > thks
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/6 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4658393&i=0>>
> >
> > > Hi!
> > >
> > > Sorry to respond once more:
> > > I can provide you an eclipse project instead.
> > > It includes an ant task for building and deploying the example by
> copying
> > > a TomEE 1.5 installation and adapting it for executing the example.
> > > Would that help?
> > >
> > > Best regards,
> > >                 Thomas
> > >
> > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > [hidden email]</user/SendEmail.jtp?type=node&node=4658393&i=1>]
> > > Sent: Montag, 5. November 2012 17:49
> > > To: Thomas Schuler
> > > Subject: Re: Use external database for persistent timer service
> > >
> > > Hi,
> > >
> > > thanks for it but is it possible to share a maven project (really
> easier
> > > for us to work on it since these days are really busy)
> > >
> > > *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*
> > >
> > >
> > >
> > >
> > > 2012/11/5 tschuler <[hidden
> > > email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
> > >
> > > > Hi!
> > > >
> > > > Added a few files for reproducing  the problem:
> > > > SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> > > > example in the JavaEE6 Tutorial stripped down to the programmatically
> > > > inserted timer.
> > > > AddProgrammaticTimer adds the programmatic timer.
> > > > Tomee.xml shows the datasource definition.
> > > > Application.properties (deployed to WEB-INF directory) shows the
> > > > definition of the used quartz scheduler.
> > > > Tables_sqlServer.sql show the SQL script provided from Quartz to
> > generate
> > > > the according tables for a MSSQL database.
> > > >
> > > > Do you need more information?
> > > >
> > > > Best regards,
> > > >         Thomas
> > > >
> > > > -----
> > > >
> > > >
> > > >
> > > >
> > > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > > [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> > > > Sent: Montag, 5. November 2012 16:27
> > > > To: Thomas Schuler
> > > > Subject: Re: Use external database for persistent timer service
> > > >
> > > > yeah, was asking to a sample to have a look locally
> > > >
> > > > thks
> > > >
> > > > *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*
> > > >
> > > >
> > > >
> > > >
> > > > 2012/11/5 tschuler <[hidden email]>
> > > >
> > > > > Hi!
> > > > >
> > > > > What do you mean with reproduce?
> > > > > If you want, I can provide you a simple example that doesn't work.
> > > > >
> > > > > Best regards,
> > > > >                 Thomas
> > > > >
> > > > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > > > [hidden email]]
> > > > > Sent: Montag, 5. November 2012 16:18
> > > > > To: Thomas Schuler
> > > > > Subject: Re: Use external database for persistent timer service
> > > > >
> > > > > Hi,
> > > > >
> > > > > can you reproduce it?
> > > > >
> > > > > normally timeoutMethod can't be null
> > > > >
> > > > > *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*
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 2012/11/5 tschuler <[hidden
> > > > > email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> > > > >
> > > > > > Hi!
> > > > > >
> > > > > > I successfully configured tomee for using an external database to
> > > > enable
> > > > > a
> > > > > > persistent timer service.
> > > > > > I tried the TimerSessionBean example within the JavaEE6 Tutorial
> > > > > > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > > > > > The quartz database tables get the job informations, but I face a
> > > > problem
> > > > > > with programmatically added timeouts:
> > > > > > They don't seem to be executed, about 90 seconds after the
> trigger
> > > time
> > > > > the
> > > > > > following message is written to the log file:
> > > > > >
> > > > > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > > > > recoverMisfiredJobs
> > > > > > INFO: Handling 2 trigger(s) that missed their scheduled
> fire-time.
> > > > > > [Timestamp]
> > > org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > > > > > manage
> > > > > > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't
> > > store
> > > > > > trigger
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > > > > > org.quartz.JobPersistenceException: Couldn't store trigger
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See
> > nested
> > > > > > exception: java.lang.NullPointerException]
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > > > > > Caused by: java.lang.NullPointerException
> > > > > >         at
> > > > > >
> > > org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> > > > > >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
> > > Source)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > > > >         at
> > > > > >
> > > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > > > >         at
> > > > > >
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > > >         at
> > > > > >
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > > >         at
> > > > > >
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > > > >         at java.util.HashMap.writeObject(HashMap.java:1001)
> > > > > >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
> > > Source)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > > > >         at
> > > > > >
> > > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > > > >         at
> > > > > >
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > > >         at
> > > > > >
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> > > > > >         at
> > > > > >
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > > >         at
> > > > > >
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > > >         at
> > > > > >
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> > > > > >         at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> > > > > >         ... 5 more
> > > > > >
> > > > > > Having a look into TimerData.java shows that timeoutMethod seems
> to
> > > be
> > > > > > null.
> > > > > >
> > > > > > What must be done to get the programmtic timeout running?
> > > > > >
> > > > > > Best regards,
> > > > > > Thomas
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > View this message in context:
> > > > > >
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> > > > > To unsubscribe from Use external database for persistent timer
> > service,
> > > > > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> > > > To unsubscribe from Use external database for persistent timer
> service,
> > > > click here.
> > > > NAML
> > > >
> > > >
> > > > SchedulerBeanPersisted.java (1K) <
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> > > > >
> > > > SchedulerBeanPersistedRemote.java (230 bytes) <
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> > > > >
> > > > AddProgrammaticTimer.java (1K) <
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> > > > >
> > > > tomee.xml (654 bytes) <
> > > > http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> > > > application.properties (1K) <
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> > > > >
> > > > tables_sqlServer.sql (14K) <
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
> > > To unsubscribe from Use external database for persistent timer service,
> > > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.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/Use-external-database-for-persistent-timer-service-tp4658321p4658393.html
> > To unsubscribe from Use external database for persistent timer service,
> > 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
> > >
> >
> >
> > PS_TOMEE.zip (1M) <
> > http://openejb.979440.n4.nabble.com/attachment/4658403/0/PS_TOMEE.zip>
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658403.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/Use-external-database-for-persistent-timer-service-tp4658321p4658410.html
> To unsubscribe from Use external database for persistent timer service,
> click here<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
> >.
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658416.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

I'm not familiar with TomEE so far.
First of all: Is my observation a bug or am I doing something wrong?
How will I know of the next snapshot, when is it planned to be ready and how can I get it?

Best regards,
                Thomas

From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658410h20@n4.nabble.com]
Sent: Mittwoch, 7. November 2012 01:35
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

Hi,

think you should test with the next snapshot ;)

(updated a bit the trunk regarding this usage)

*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*




2012/11/6 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658410&i=0>>

> Hi Romain!
>
> Attached the packed eclipse project.
> Please check README.txt how to adapt to your local system.
>
> It includes a simple example "Timer" demonstrating a scheduled bean
> without persistence.
>
> The example "Timer (persisted)" should demonstrate a persisted scheduled
> bean.
> This does only work for the automated timeout - it still runs after TomEE
> restart.
> The programmatic timeout can be added but is never executed but shows the
> described error message.
>
> Hope that helps.
> Feel free to contact me if you need additional information.
>
> Best regards,
>                 Thomas
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=4658410&i=1>]
> Sent: Dienstag, 6. November 2012 14:19
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> Hi,
>
> yes Romain ;)
>
>
> Don't know Bruno i think
>
> Ant is fine too, what i meant is sthg improtable in an IDE and buildable in
> command line
>
> thks
>
> *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*
>
>
>
>
> 2012/11/6 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658393&i=0>>
>
> > Hi!
> >
> > Sorry to respond once more:
> > I can provide you an eclipse project instead.
> > It includes an ant task for building and deploying the example by copying
> > a TomEE 1.5 installation and adapting it for executing the example.
> > Would that help?
> >
> > Best regards,
> >                 Thomas
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4658393&i=1>]
> > Sent: Montag, 5. November 2012 17:49
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > Hi,
> >
> > thanks for it but is it possible to share a maven project (really easier
> > for us to work on it since these days are really busy)
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/5 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
> >
> > > Hi!
> > >
> > > Added a few files for reproducing  the problem:
> > > SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> > > example in the JavaEE6 Tutorial stripped down to the programmatically
> > > inserted timer.
> > > AddProgrammaticTimer adds the programmatic timer.
> > > Tomee.xml shows the datasource definition.
> > > Application.properties (deployed to WEB-INF directory) shows the
> > > definition of the used quartz scheduler.
> > > Tables_sqlServer.sql show the SQL script provided from Quartz to
> generate
> > > the according tables for a MSSQL database.
> > >
> > > Do you need more information?
> > >
> > > Best regards,
> > >         Thomas
> > >
> > > -----
> > >
> > >
> > >
> > >
> > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> > > Sent: Montag, 5. November 2012 16:27
> > > To: Thomas Schuler
> > > Subject: Re: Use external database for persistent timer service
> > >
> > > yeah, was asking to a sample to have a look locally
> > >
> > > thks
> > >
> > > *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*
> > >
> > >
> > >
> > >
> > > 2012/11/5 tschuler <[hidden email]>
> > >
> > > > Hi!
> > > >
> > > > What do you mean with reproduce?
> > > > If you want, I can provide you a simple example that doesn't work.
> > > >
> > > > Best regards,
> > > >                 Thomas
> > > >
> > > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > > [hidden email]]
> > > > Sent: Montag, 5. November 2012 16:18
> > > > To: Thomas Schuler
> > > > Subject: Re: Use external database for persistent timer service
> > > >
> > > > Hi,
> > > >
> > > > can you reproduce it?
> > > >
> > > > normally timeoutMethod can't be null
> > > >
> > > > *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*
> > > >
> > > >
> > > >
> > > >
> > > > 2012/11/5 tschuler <[hidden
> > > > email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> > > >
> > > > > Hi!
> > > > >
> > > > > I successfully configured tomee for using an external database to
> > > enable
> > > > a
> > > > > persistent timer service.
> > > > > I tried the TimerSessionBean example within the JavaEE6 Tutorial
> > > > > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > > > > The quartz database tables get the job informations, but I face a
> > > problem
> > > > > with programmatically added timeouts:
> > > > > They don't seem to be executed, about 90 seconds after the trigger
> > time
> > > > the
> > > > > following message is written to the log file:
> > > > >
> > > > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > > > recoverMisfiredJobs
> > > > > INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> > > > > [Timestamp]
> > org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > > > > manage
> > > > > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't
> > store
> > > > > trigger
> > > > >
> > > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > > > > org.quartz.JobPersistenceException: Couldn't store trigger
> > > > >
> > > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See
> nested
> > > > > exception: java.lang.NullPointerException]
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > > > > Caused by: java.lang.NullPointerException
> > > > >         at
> > > > >
> > org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> > > > >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
> > Source)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > > >         at
> > > > >
> > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > > >         at
> > > > >
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > >         at
> > > > >
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > >         at
> > > > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > > >         at java.util.HashMap.writeObject(HashMap.java:1001)
> > > > >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
> > Source)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > > >         at
> > > > >
> > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > > >         at
> > > > >
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > >         at
> > > > >
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > >         at
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> > > > >         at
> > > > >
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > >         at
> > > > >
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > >         at
> > > > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> > > > >         ... 5 more
> > > > >
> > > > > Having a look into TimerData.java shows that timeoutMethod seems to
> > be
> > > > > null.
> > > > >
> > > > > What must be done to get the programmtic timeout running?
> > > > >
> > > > > Best regards,
> > > > > Thomas
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> > > > To unsubscribe from Use external database for persistent timer
> service,
> > > > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> > > To unsubscribe from Use external database for persistent timer service,
> > > click here.
> > > NAML
> > >
> > >
> > > SchedulerBeanPersisted.java (1K) <
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> > > >
> > > SchedulerBeanPersistedRemote.java (230 bytes) <
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> > > >
> > > AddProgrammaticTimer.java (1K) <
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> > > >
> > > tomee.xml (654 bytes) <
> > > http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> > > application.properties (1K) <
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> > > >
> > > tables_sqlServer.sql (14K) <
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
> > To unsubscribe from Use external database for persistent timer service,
> > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.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/Use-external-database-for-persistent-timer-service-tp4658321p4658393.html
> To unsubscribe from Use external database for persistent timer service,
> 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
> >
>
>
> PS_TOMEE.zip (1M) <
> http://openejb.979440.n4.nabble.com/attachment/4658403/0/PS_TOMEE.zip>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658403.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/Use-external-database-for-persistent-timer-service-tp4658321p4658410.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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/Use-external-database-for-persistent-timer-service-tp4658321p4658416.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

think you should test with the next snapshot ;)

(updated a bit the trunk regarding this usage)

*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*




2012/11/6 tschuler <th...@opentext.com>

> Hi Romain!
>
> Attached the packed eclipse project.
> Please check README.txt how to adapt to your local system.
>
> It includes a simple example "Timer" demonstrating a scheduled bean
> without persistence.
>
> The example "Timer (persisted)" should demonstrate a persisted scheduled
> bean.
> This does only work for the automated timeout - it still runs after TomEE
> restart.
> The programmatic timeout can be added but is never executed but shows the
> described error message.
>
> Hope that helps.
> Feel free to contact me if you need additional information.
>
> Best regards,
>                 Thomas
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658393h93@n4.nabble.com]
> Sent: Dienstag, 6. November 2012 14:19
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> Hi,
>
> yes Romain ;)
>
>
> Don't know Bruno i think
>
> Ant is fine too, what i meant is sthg improtable in an IDE and buildable in
> command line
>
> thks
>
> *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*
>
>
>
>
> 2012/11/6 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658393&i=0>>
>
> > Hi!
> >
> > Sorry to respond once more:
> > I can provide you an eclipse project instead.
> > It includes an ant task for building and deploying the example by copying
> > a TomEE 1.5 installation and adapting it for executing the example.
> > Would that help?
> >
> > Best regards,
> >                 Thomas
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4658393&i=1>]
> > Sent: Montag, 5. November 2012 17:49
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > Hi,
> >
> > thanks for it but is it possible to share a maven project (really easier
> > for us to work on it since these days are really busy)
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/5 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
> >
> > > Hi!
> > >
> > > Added a few files for reproducing  the problem:
> > > SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> > > example in the JavaEE6 Tutorial stripped down to the programmatically
> > > inserted timer.
> > > AddProgrammaticTimer adds the programmatic timer.
> > > Tomee.xml shows the datasource definition.
> > > Application.properties (deployed to WEB-INF directory) shows the
> > > definition of the used quartz scheduler.
> > > Tables_sqlServer.sql show the SQL script provided from Quartz to
> generate
> > > the according tables for a MSSQL database.
> > >
> > > Do you need more information?
> > >
> > > Best regards,
> > >         Thomas
> > >
> > > -----
> > >
> > >
> > >
> > >
> > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> > > Sent: Montag, 5. November 2012 16:27
> > > To: Thomas Schuler
> > > Subject: Re: Use external database for persistent timer service
> > >
> > > yeah, was asking to a sample to have a look locally
> > >
> > > thks
> > >
> > > *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*
> > >
> > >
> > >
> > >
> > > 2012/11/5 tschuler <[hidden email]>
> > >
> > > > Hi!
> > > >
> > > > What do you mean with reproduce?
> > > > If you want, I can provide you a simple example that doesn't work.
> > > >
> > > > Best regards,
> > > >                 Thomas
> > > >
> > > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > > [hidden email]]
> > > > Sent: Montag, 5. November 2012 16:18
> > > > To: Thomas Schuler
> > > > Subject: Re: Use external database for persistent timer service
> > > >
> > > > Hi,
> > > >
> > > > can you reproduce it?
> > > >
> > > > normally timeoutMethod can't be null
> > > >
> > > > *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*
> > > >
> > > >
> > > >
> > > >
> > > > 2012/11/5 tschuler <[hidden
> > > > email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> > > >
> > > > > Hi!
> > > > >
> > > > > I successfully configured tomee for using an external database to
> > > enable
> > > > a
> > > > > persistent timer service.
> > > > > I tried the TimerSessionBean example within the JavaEE6 Tutorial
> > > > > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > > > > The quartz database tables get the job informations, but I face a
> > > problem
> > > > > with programmatically added timeouts:
> > > > > They don't seem to be executed, about 90 seconds after the trigger
> > time
> > > > the
> > > > > following message is written to the log file:
> > > > >
> > > > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > > > recoverMisfiredJobs
> > > > > INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> > > > > [Timestamp]
> > org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > > > > manage
> > > > > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't
> > store
> > > > > trigger
> > > > >
> > > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > > > > org.quartz.JobPersistenceException: Couldn't store trigger
> > > > >
> > > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See
> nested
> > > > > exception: java.lang.NullPointerException]
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > > > > Caused by: java.lang.NullPointerException
> > > > >         at
> > > > >
> > org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> > > > >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
> > Source)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > > >         at
> > > > >
> > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > > >         at
> > > > >
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > >         at
> > > > >
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > >         at
> > > > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > > >         at java.util.HashMap.writeObject(HashMap.java:1001)
> > > > >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
> > Source)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > > >         at
> > > > >
> > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > > >         at
> > > > >
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > >         at
> > > > >
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > >         at
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> > > > >         at
> > > > >
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > > >         at
> > > > >
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > > >         at
> > > > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> > > > >         at
> > > > >
> > > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> > > > >         ... 5 more
> > > > >
> > > > > Having a look into TimerData.java shows that timeoutMethod seems to
> > be
> > > > > null.
> > > > >
> > > > > What must be done to get the programmtic timeout running?
> > > > >
> > > > > Best regards,
> > > > > Thomas
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> > > > To unsubscribe from Use external database for persistent timer
> service,
> > > > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> > > To unsubscribe from Use external database for persistent timer service,
> > > click here.
> > > NAML
> > >
> > >
> > > SchedulerBeanPersisted.java (1K) <
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> > > >
> > > SchedulerBeanPersistedRemote.java (230 bytes) <
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> > > >
> > > AddProgrammaticTimer.java (1K) <
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> > > >
> > > tomee.xml (654 bytes) <
> > > http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> > > application.properties (1K) <
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> > > >
> > > tables_sqlServer.sql (14K) <
> > >
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
> > To unsubscribe from Use external database for persistent timer service,
> > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.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/Use-external-database-for-persistent-timer-service-tp4658321p4658393.html
> To unsubscribe from Use external database for persistent timer service,
> click here<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
> >.
> 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
> >
>
>
> PS_TOMEE.zip (1M) <
> http://openejb.979440.n4.nabble.com/attachment/4658403/0/PS_TOMEE.zip>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658403.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi Romain!

Attached the packed eclipse project.
Please check README.txt how to adapt to your local system.

It includes a simple example "Timer" demonstrating a scheduled bean without persistence.

The example "Timer (persisted)" should demonstrate a persisted scheduled bean.
This does only work for the automated timeout - it still runs after TomEE restart.
The programmatic timeout can be added but is never executed but shows the described error message.

Hope that helps.
Feel free to contact me if you need additional information.

Best regards,
                Thomas

From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658393h93@n4.nabble.com]
Sent: Dienstag, 6. November 2012 14:19
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

Hi,

yes Romain ;)


Don't know Bruno i think

Ant is fine too, what i meant is sthg improtable in an IDE and buildable in
command line

thks

*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*




2012/11/6 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658393&i=0>>

> Hi!
>
> Sorry to respond once more:
> I can provide you an eclipse project instead.
> It includes an ant task for building and deploying the example by copying
> a TomEE 1.5 installation and adapting it for executing the example.
> Would that help?
>
> Best regards,
>                 Thomas
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=4658393&i=1>]
> Sent: Montag, 5. November 2012 17:49
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> Hi,
>
> thanks for it but is it possible to share a maven project (really easier
> for us to work on it since these days are really busy)
>
> *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*
>
>
>
>
> 2012/11/5 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
>
> > Hi!
> >
> > Added a few files for reproducing  the problem:
> > SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> > example in the JavaEE6 Tutorial stripped down to the programmatically
> > inserted timer.
> > AddProgrammaticTimer adds the programmatic timer.
> > Tomee.xml shows the datasource definition.
> > Application.properties (deployed to WEB-INF directory) shows the
> > definition of the used quartz scheduler.
> > Tables_sqlServer.sql show the SQL script provided from Quartz to generate
> > the according tables for a MSSQL database.
> >
> > Do you need more information?
> >
> > Best regards,
> >         Thomas
> >
> > -----
> >
> >
> >
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> > Sent: Montag, 5. November 2012 16:27
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > yeah, was asking to a sample to have a look locally
> >
> > thks
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/5 tschuler <[hidden email]>
> >
> > > Hi!
> > >
> > > What do you mean with reproduce?
> > > If you want, I can provide you a simple example that doesn't work.
> > >
> > > Best regards,
> > >                 Thomas
> > >
> > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > [hidden email]]
> > > Sent: Montag, 5. November 2012 16:18
> > > To: Thomas Schuler
> > > Subject: Re: Use external database for persistent timer service
> > >
> > > Hi,
> > >
> > > can you reproduce it?
> > >
> > > normally timeoutMethod can't be null
> > >
> > > *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*
> > >
> > >
> > >
> > >
> > > 2012/11/5 tschuler <[hidden
> > > email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> > >
> > > > Hi!
> > > >
> > > > I successfully configured tomee for using an external database to
> > enable
> > > a
> > > > persistent timer service.
> > > > I tried the TimerSessionBean example within the JavaEE6 Tutorial
> > > > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > > > The quartz database tables get the job informations, but I face a
> > problem
> > > > with programmatically added timeouts:
> > > > They don't seem to be executed, about 90 seconds after the trigger
> time
> > > the
> > > > following message is written to the log file:
> > > >
> > > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > > recoverMisfiredJobs
> > > > INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> > > > [Timestamp]
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > > > manage
> > > > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't
> store
> > > > trigger
> > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > > > org.quartz.JobPersistenceException: Couldn't store trigger
> > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
> > > > exception: java.lang.NullPointerException]
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > > > Caused by: java.lang.NullPointerException
> > > >         at
> > > >
> org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> > > >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
> Source)
> > > >         at
> > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > >         at
> > > >
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > >         at
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > >         at
> > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > >         at
> > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > >         at
> > > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > >         at java.util.HashMap.writeObject(HashMap.java:1001)
> > > >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
> Source)
> > > >         at
> > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > >         at
> > > >
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > >         at
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > >         at
> > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > >         at
> > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > >         at
> > > >
> > >
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> > > >         at
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> > > >         at
> > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > >         at
> > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > >         at
> > > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> > > >         ... 5 more
> > > >
> > > > Having a look into TimerData.java shows that timeoutMethod seems to
> be
> > > > null.
> > > >
> > > > What must be done to get the programmtic timeout running?
> > > >
> > > > Best regards,
> > > > Thomas
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> > > To unsubscribe from Use external database for persistent timer service,
> > > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> > To unsubscribe from Use external database for persistent timer service,
> > click here.
> > NAML
> >
> >
> > SchedulerBeanPersisted.java (1K) <
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> > >
> > SchedulerBeanPersistedRemote.java (230 bytes) <
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> > >
> > AddProgrammaticTimer.java (1K) <
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> > >
> > tomee.xml (654 bytes) <
> > http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> > application.properties (1K) <
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> > >
> > tables_sqlServer.sql (14K) <
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
> To unsubscribe from Use external database for persistent timer service,
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.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/Use-external-database-for-persistent-timer-service-tp4658321p4658393.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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>


PS_TOMEE.zip (1M) <http://openejb.979440.n4.nabble.com/attachment/4658403/0/PS_TOMEE.zip>




--
View this message in context: http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658403.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

yes Romain ;)


Don't know Bruno i think

Ant is fine too, what i meant is sthg improtable in an IDE and buildable in
command line

thks

*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*




2012/11/6 tschuler <th...@opentext.com>

> Hi!
>
> Sorry to respond once more:
> I can provide you an eclipse project instead.
> It includes an ant task for building and deploying the example by copying
> a TomEE 1.5 installation and adapting it for executing the example.
> Would that help?
>
> Best regards,
>                 Thomas
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658382h52@n4.nabble.com]
> Sent: Montag, 5. November 2012 17:49
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> Hi,
>
> thanks for it but is it possible to share a maven project (really easier
> for us to work on it since these days are really busy)
>
> *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*
>
>
>
>
> 2012/11/5 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>
>
> > Hi!
> >
> > Added a few files for reproducing  the problem:
> > SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> > example in the JavaEE6 Tutorial stripped down to the programmatically
> > inserted timer.
> > AddProgrammaticTimer adds the programmatic timer.
> > Tomee.xml shows the datasource definition.
> > Application.properties (deployed to WEB-INF directory) shows the
> > definition of the used quartz scheduler.
> > Tables_sqlServer.sql show the SQL script provided from Quartz to generate
> > the according tables for a MSSQL database.
> >
> > Do you need more information?
> >
> > Best regards,
> >         Thomas
> >
> > -----
> >
> >
> >
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> > Sent: Montag, 5. November 2012 16:27
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > yeah, was asking to a sample to have a look locally
> >
> > thks
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/5 tschuler <[hidden email]>
> >
> > > Hi!
> > >
> > > What do you mean with reproduce?
> > > If you want, I can provide you a simple example that doesn't work.
> > >
> > > Best regards,
> > >                 Thomas
> > >
> > > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > > [hidden email]]
> > > Sent: Montag, 5. November 2012 16:18
> > > To: Thomas Schuler
> > > Subject: Re: Use external database for persistent timer service
> > >
> > > Hi,
> > >
> > > can you reproduce it?
> > >
> > > normally timeoutMethod can't be null
> > >
> > > *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*
> > >
> > >
> > >
> > >
> > > 2012/11/5 tschuler <[hidden
> > > email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> > >
> > > > Hi!
> > > >
> > > > I successfully configured tomee for using an external database to
> > enable
> > > a
> > > > persistent timer service.
> > > > I tried the TimerSessionBean example within the JavaEE6 Tutorial
> > > > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > > > The quartz database tables get the job informations, but I face a
> > problem
> > > > with programmatically added timeouts:
> > > > They don't seem to be executed, about 90 seconds after the trigger
> time
> > > the
> > > > following message is written to the log file:
> > > >
> > > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > > recoverMisfiredJobs
> > > > INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> > > > [Timestamp]
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > > > manage
> > > > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't
> store
> > > > trigger
> > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > > > org.quartz.JobPersistenceException: Couldn't store trigger
> > > >
> > > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
> > > > exception: java.lang.NullPointerException]
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > > > Caused by: java.lang.NullPointerException
> > > >         at
> > > >
> org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> > > >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
> Source)
> > > >         at
> > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > >         at
> > > >
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > >         at
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > >         at
> > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > >         at
> > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > >         at
> > > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > >         at java.util.HashMap.writeObject(HashMap.java:1001)
> > > >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown
> Source)
> > > >         at
> > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > >         at
> > > >
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > > >         at
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > > >         at
> > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > >         at
> > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > >         at
> > > >
> > >
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> > > >         at
> > > >
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> > > >         at
> > > >
> > > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > > >         at
> > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > > >         at
> > > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> > > >         at
> > > >
> > > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> > > >         ... 5 more
> > > >
> > > > Having a look into TimerData.java shows that timeoutMethod seems to
> be
> > > > null.
> > > >
> > > > What must be done to get the programmtic timeout running?
> > > >
> > > > Best regards,
> > > > Thomas
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> > > To unsubscribe from Use external database for persistent timer service,
> > > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> > To unsubscribe from Use external database for persistent timer service,
> > click here.
> > NAML
> >
> >
> > SchedulerBeanPersisted.java (1K) <
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> > >
> > SchedulerBeanPersistedRemote.java (230 bytes) <
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> > >
> > AddProgrammaticTimer.java (1K) <
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> > >
> > tomee.xml (654 bytes) <
> > http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> > application.properties (1K) <
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> > >
> > tables_sqlServer.sql (14K) <
> >
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
> To unsubscribe from Use external database for persistent timer service,
> click here<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
> >.
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi!

Sorry to respond once more:
I can provide you an eclipse project instead.
It includes an ant task for building and deploying the example by copying a TomEE 1.5 installation and adapting it for executing the example.
Would that help?

Best regards,
                Thomas

From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658382h52@n4.nabble.com]
Sent: Montag, 5. November 2012 17:49
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

Hi,

thanks for it but is it possible to share a maven project (really easier
for us to work on it since these days are really busy)

*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*




2012/11/5 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=0>>

> Hi!
>
> Added a few files for reproducing  the problem:
> SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> example in the JavaEE6 Tutorial stripped down to the programmatically
> inserted timer.
> AddProgrammaticTimer adds the programmatic timer.
> Tomee.xml shows the datasource definition.
> Application.properties (deployed to WEB-INF directory) shows the
> definition of the used quartz scheduler.
> Tables_sqlServer.sql show the SQL script provided from Quartz to generate
> the according tables for a MSSQL database.
>
> Do you need more information?
>
> Best regards,
>         Thomas
>
> -----
>
>
>
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=4658382&i=1>]
> Sent: Montag, 5. November 2012 16:27
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> yeah, was asking to a sample to have a look locally
>
> thks
>
> *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*
>
>
>
>
> 2012/11/5 tschuler <[hidden email]>
>
> > Hi!
> >
> > What do you mean with reproduce?
> > If you want, I can provide you a simple example that doesn't work.
> >
> > Best regards,
> >                 Thomas
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]]
> > Sent: Montag, 5. November 2012 16:18
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > Hi,
> >
> > can you reproduce it?
> >
> > normally timeoutMethod can't be null
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/5 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> >
> > > Hi!
> > >
> > > I successfully configured tomee for using an external database to
> enable
> > a
> > > persistent timer service.
> > > I tried the TimerSessionBean example within the JavaEE6 Tutorial
> > > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > > The quartz database tables get the job informations, but I face a
> problem
> > > with programmatically added timeouts:
> > > They don't seem to be executed, about 90 seconds after the trigger time
> > the
> > > following message is written to the log file:
> > >
> > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > recoverMisfiredJobs
> > > INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > > manage
> > > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't store
> > > trigger
> > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > > org.quartz.JobPersistenceException: Couldn't store trigger
> > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
> > > exception: java.lang.NullPointerException]
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > > Caused by: java.lang.NullPointerException
> > >         at
> > > org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> > >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
> > >         at
> > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > >         at
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > >         at
> > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > >         at
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > >         at
> > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > >         at java.util.HashMap.writeObject(HashMap.java:1001)
> > >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
> > >         at
> > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > >         at
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > >         at
> > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > >         at
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > >         at
> > >
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> > >         at
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> > >         at
> > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > >         at
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > >         at
> > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> > >         ... 5 more
> > >
> > > Having a look into TimerData.java shows that timeoutMethod seems to be
> > > null.
> > >
> > > What must be done to get the programmtic timeout running?
> > >
> > > Best regards,
> > > Thomas
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> > To unsubscribe from Use external database for persistent timer service,
> > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> To unsubscribe from Use external database for persistent timer service,
> click here.
> NAML
>
>
> SchedulerBeanPersisted.java (1K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> >
> SchedulerBeanPersistedRemote.java (230 bytes) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> >
> AddProgrammaticTimer.java (1K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> >
> tomee.xml (654 bytes) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> application.properties (1K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> >
> tables_sqlServer.sql (14K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> >
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.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/Use-external-database-for-persistent-timer-service-tp4658321p4658382.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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/Use-external-database-for-persistent-timer-service-tp4658321p4658388.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

thanks for it but is it possible to share a maven project (really easier
for us to work on it since these days are really busy)

*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*




2012/11/5 tschuler <th...@opentext.com>

> Hi!
>
> Added a few files for reproducing  the problem:
> SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the
> example in the JavaEE6 Tutorial stripped down to the programmatically
> inserted timer.
> AddProgrammaticTimer adds the programmatic timer.
> Tomee.xml shows the datasource definition.
> Application.properties (deployed to WEB-INF directory) shows the
> definition of the used quartz scheduler.
> Tables_sqlServer.sql show the SQL script provided from Quartz to generate
> the according tables for a MSSQL database.
>
> Do you need more information?
>
> Best regards,
>         Thomas
>
> -----
>
>
>
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658376h66@n4.nabble.com]
> Sent: Montag, 5. November 2012 16:27
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> yeah, was asking to a sample to have a look locally
>
> thks
>
> *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*
>
>
>
>
> 2012/11/5 tschuler <[hidden email]>
>
> > Hi!
> >
> > What do you mean with reproduce?
> > If you want, I can provide you a simple example that doesn't work.
> >
> > Best regards,
> >                 Thomas
> >
> > From: Romain Manni-Bucau [via OpenEJB] [mailto:
> > [hidden email]]
> > Sent: Montag, 5. November 2012 16:18
> > To: Thomas Schuler
> > Subject: Re: Use external database for persistent timer service
> >
> > Hi,
> >
> > can you reproduce it?
> >
> > normally timeoutMethod can't be null
> >
> > *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*
> >
> >
> >
> >
> > 2012/11/5 tschuler <[hidden
> > email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
> >
> > > Hi!
> > >
> > > I successfully configured tomee for using an external database to
> enable
> > a
> > > persistent timer service.
> > > I tried the TimerSessionBean example within the JavaEE6 Tutorial
> > > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > > The quartz database tables get the job informations, but I face a
> problem
> > > with programmatically added timeouts:
> > > They don't seem to be executed, about 90 seconds after the trigger time
> > the
> > > following message is written to the log file:
> > >
> > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > > recoverMisfiredJobs
> > > INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> > > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > > manage
> > > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't store
> > > trigger
> > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > > org.quartz.JobPersistenceException: Couldn't store trigger
> > >
> > >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
> > > exception: java.lang.NullPointerException]
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > > Caused by: java.lang.NullPointerException
> > >         at
> > > org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> > >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
> > >         at
> > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > >         at
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > >         at
> > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > >         at
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > >         at
> > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > >         at java.util.HashMap.writeObject(HashMap.java:1001)
> > >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
> > >         at
> > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> > >         at
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> > >         at
> > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > >         at
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > >         at
> > >
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> > >         at
> > >
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> > >         at
> > >
> > >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> > >         at
> > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> > >         at
> > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> > >         at
> > >
> > >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> > >         ... 5 more
> > >
> > > Having a look into TimerData.java shows that timeoutMethod seems to be
> > > null.
> > >
> > > What must be done to get the programmtic timeout running?
> > >
> > > Best regards,
> > > Thomas
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> > To unsubscribe from Use external database for persistent timer service,
> > 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html
> To unsubscribe from Use external database for persistent timer service,
> click here.
> NAML
>
>
> SchedulerBeanPersisted.java (1K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java
> >
> SchedulerBeanPersistedRemote.java (230 bytes) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java
> >
> AddProgrammaticTimer.java (1K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java
> >
> tomee.xml (654 bytes) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
> application.properties (1K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties
> >
> tables_sqlServer.sql (14K) <
> http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql
> >
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi!

Added a few files for reproducing  the problem:
SchedulerBeanPersisted and SchedulerBeanPersistedRemote are like the example in the JavaEE6 Tutorial stripped down to the programmatically inserted timer.
AddProgrammaticTimer adds the programmatic timer.
Tomee.xml shows the datasource definition.
Application.properties (deployed to WEB-INF directory) shows the definition of the used quartz scheduler.
Tables_sqlServer.sql show the SQL script provided from Quartz to generate the according tables for a MSSQL database.

Do you need more information?

Best regards,
	Thomas

-----




From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658376h66@n4.nabble.com] 
Sent: Montag, 5. November 2012 16:27
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

yeah, was asking to a sample to have a look locally 

thks 

*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*




2012/11/5 tschuler <[hidden email]> 

> Hi! 
> 
> What do you mean with reproduce? 
> If you want, I can provide you a simple example that doesn't work. 
> 
> Best regards, 
>                 Thomas 
> 
> From: Romain Manni-Bucau [via OpenEJB] [mailto: 
> [hidden email]] 
> Sent: Montag, 5. November 2012 16:18 
> To: Thomas Schuler 
> Subject: Re: Use external database for persistent timer service 
> 
> Hi, 
> 
> can you reproduce it? 
> 
> normally timeoutMethod can't be null 
> 
> *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*
> 
> 
> 
> 
> 2012/11/5 tschuler <[hidden 
> email]</user/SendEmail.jtp?type=node&node=4658374&i=0>> 
> 
> > Hi! 
> > 
> > I successfully configured tomee for using an external database to enable 
> a 
> > persistent timer service. 
> > I tried the TimerSessionBean example within the JavaEE6 Tutorial 
> > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html). 
> > The quartz database tables get the job informations, but I face a problem 
> > with programmatically added timeouts: 
> > They don't seem to be executed, about 90 seconds after the trigger time 
> the 
> > following message is written to the log file: 
> > 
> > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport 
> > recoverMisfiredJobs 
> > INFO: Handling 2 trigger(s) that missed their scheduled fire-time. 
> > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler 
> > manage 
> > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't store 
> > trigger 
> > 
> > 
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1' 
> > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null 
> > org.quartz.JobPersistenceException: Couldn't store trigger 
> > 
> > 
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1' 
> > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested 
> > exception: java.lang.NullPointerException] 
> >         at 
> > 
> > 
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212) 
> >         at 
> > 
> > 
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026) 
> >         at 
> > 
> > 
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975) 
> >         at 
> > 
> > 
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187) 
> >         at 
> > 
> > 
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947) 
> >         at 
> > 
> > 
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968) 
> > Caused by: java.lang.NullPointerException 
> >         at 
> > org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120) 
> >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) 
> >         at 
> > 
> > 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
> >         at java.lang.reflect.Method.invoke(Method.java:597) 
> >         at 
> > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) 
> >         at 
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469) 
> >         at 
> > 
> > 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) 
> >         at 
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) 
> >         at 
> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) 
> >         at java.util.HashMap.writeObject(HashMap.java:1001) 
> >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source) 
> >         at 
> > 
> > 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
> >         at java.lang.reflect.Method.invoke(Method.java:597) 
> >         at 
> > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) 
> >         at 
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469) 
> >         at 
> > 
> > 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) 
> >         at 
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) 
> >         at 
> > 
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) 
> >         at 
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483) 
> >         at 
> > 
> > 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) 
> >         at 
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) 
> >         at 
> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) 
> >         at 
> > 
> > 
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011) 
> >         at 
> > 
> > 
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036) 
> >         at 
> > 
> > 
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168) 
> >         at 
> > 
> > 
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207) 
> >         ... 5 more 
> > 
> > Having a look into TimerData.java shows that timeoutMethod seems to be 
> > null. 
> > 
> > What must be done to get the programmtic timeout running? 
> > 
> > Best regards, 
> > Thomas 
> > 
> > 
> > 
> > -- 
> > View this message in context: 
> > 
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> To unsubscribe from Use external database for persistent timer service, 
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.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/Use-external-database-for-persistent-timer-service-tp4658321p4658376.html 
To unsubscribe from Use external database for persistent timer service, click here.
NAML 


SchedulerBeanPersisted.java (1K) <http://openejb.979440.n4.nabble.com/attachment/4658381/0/SchedulerBeanPersisted.java>
SchedulerBeanPersistedRemote.java (230 bytes) <http://openejb.979440.n4.nabble.com/attachment/4658381/1/SchedulerBeanPersistedRemote.java>
AddProgrammaticTimer.java (1K) <http://openejb.979440.n4.nabble.com/attachment/4658381/2/AddProgrammaticTimer.java>
tomee.xml (654 bytes) <http://openejb.979440.n4.nabble.com/attachment/4658381/3/tomee.xml>
application.properties (1K) <http://openejb.979440.n4.nabble.com/attachment/4658381/4/application.properties>
tables_sqlServer.sql (14K) <http://openejb.979440.n4.nabble.com/attachment/4658381/5/tables_sqlServer.sql>




--
View this message in context: http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658381.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
yeah, was asking to a sample to have a look locally

thks

*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*




2012/11/5 tschuler <th...@opentext.com>

> Hi!
>
> What do you mean with reproduce?
> If you want, I can provide you a simple example that doesn't work.
>
> Best regards,
>                 Thomas
>
> From: Romain Manni-Bucau [via OpenEJB] [mailto:
> ml-node+s979440n4658374h4@n4.nabble.com]
> Sent: Montag, 5. November 2012 16:18
> To: Thomas Schuler
> Subject: Re: Use external database for persistent timer service
>
> Hi,
>
> can you reproduce it?
>
> normally timeoutMethod can't be null
>
> *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*
>
>
>
>
> 2012/11/5 tschuler <[hidden
> email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>
>
> > Hi!
> >
> > I successfully configured tomee for using an external database to enable
> a
> > persistent timer service.
> > I tried the TimerSessionBean example within the JavaEE6 Tutorial
> > (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> > The quartz database tables get the job informations, but I face a problem
> > with programmatically added timeouts:
> > They don't seem to be executed, about 90 seconds after the trigger time
> the
> > following message is written to the log file:
> >
> > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> > recoverMisfiredJobs
> > INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> > [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> > manage
> > SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't store
> > trigger
> >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> > org.quartz.JobPersistenceException: Couldn't store trigger
> >
> >
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> > for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
> > exception: java.lang.NullPointerException]
> >         at
> >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
> >         at
> >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
> >         at
> >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
> >         at
> >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
> >         at
> >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
> >         at
> >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> > Caused by: java.lang.NullPointerException
> >         at
> > org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
> >         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
> >         at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:597)
> >         at
> > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> >         at
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> >         at
> >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> >         at
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> >         at
> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> >         at java.util.HashMap.writeObject(HashMap.java:1001)
> >         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
> >         at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:597)
> >         at
> > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
> >         at
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> >         at
> >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> >         at
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> >         at
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> >         at
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> >         at
> >
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> >         at
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> >         at
> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> >         at
> >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
> >         at
> >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
> >         at
> >
> >
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
> >         at
> >
> >
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
> >         ... 5 more
> >
> > Having a look into TimerData.java shows that timeoutMethod seems to be
> > null.
> >
> > What must be done to get the programmtic timeout running?
> >
> > Best regards,
> > Thomas
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
> To unsubscribe from Use external database for persistent timer service,
> click here<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=
> >.
> 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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

RE: Use external database for persistent timer service

Posted by tschuler <th...@opentext.com>.
Hi!

What do you mean with reproduce?
If you want, I can provide you a simple example that doesn't work.

Best regards,
                Thomas

From: Romain Manni-Bucau [via OpenEJB] [mailto:ml-node+s979440n4658374h4@n4.nabble.com]
Sent: Montag, 5. November 2012 16:18
To: Thomas Schuler
Subject: Re: Use external database for persistent timer service

Hi,

can you reproduce it?

normally timeoutMethod can't be null

*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*




2012/11/5 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4658374&i=0>>

> Hi!
>
> I successfully configured tomee for using an external database to enable a
> persistent timer service.
> I tried the TimerSessionBean example within the JavaEE6 Tutorial
> (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> The quartz database tables get the job informations, but I face a problem
> with programmatically added timeouts:
> They don't seem to be executed, about 90 seconds after the trigger time the
> following message is written to the log file:
>
> [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> recoverMisfiredJobs
> INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> manage
> SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't store
> trigger
>
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> org.quartz.JobPersistenceException: Couldn't store trigger
>
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
> exception: java.lang.NullPointerException]
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> Caused by: java.lang.NullPointerException
>         at
> org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
>         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>         at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
>         at
>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>         at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
>         at java.util.HashMap.writeObject(HashMap.java:1001)
>         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>         at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
>         at
>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>         at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
>         at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
>         at
>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>         at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
>         at
>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
>         at
>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
>         at
>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
>         ... 5 more
>
> Having a look into TimerData.java shows that timeoutMethod seems to be
> null.
>
> What must be done to get the programmtic timeout running?
>
> Best regards,
> Thomas
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.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/Use-external-database-for-persistent-timer-service-tp4658321p4658374.html
To unsubscribe from Use external database for persistent timer service, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658321&code=dGhvbWFzLnNjaHVsZXJAb3BlbnRleHQuY29tfDQ2NTgzMjF8LTE4NTIyNTQ0OTI=>.
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/Use-external-database-for-persistent-timer-service-tp4658321p4658375.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Use external database for persistent timer service

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

can you reproduce it?

normally timeoutMethod can't be null

*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*




2012/11/5 tschuler <th...@opentext.com>

> Hi!
>
> I successfully configured tomee for using an external database to enable a
> persistent timer service.
> I tried the TimerSessionBean example within the JavaEE6 Tutorial
> (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).
> The quartz database tables get the job informations, but I face a problem
> with programmatically added timeouts:
> They don't seem to be executed, about 90 seconds after the trigger time the
> following message is written to the log file:
>
> [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport
> recoverMisfiredJobs
> INFO: Handling 2 trigger(s) that missed their scheduled fire-time.
> [Timestamp] org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler
> manage
> SCHWERWIEGEND: MisfireHandler: Error handling misfires: Couldn't store
> trigger
>
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null
> org.quartz.JobPersistenceException: Couldn't store trigger
>
> 'OPEN_EJB_TIMEOUT_TRIGGER_GROUP.OPEN_EJB_TIMEOUT_TRIGGER_SchedulerBeanPersisted_1'
> for 'OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB' job:null [See nested
> exception: java.lang.NullPointerException]
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1212)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:1026)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:975)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
> Caused by: java.lang.NullPointerException
>         at
> org.apache.openejb.core.timer.TimerData.writeObject(TimerData.java:120)
>         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>         at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
>         at
>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>         at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
>         at java.util.HashMap.writeObject(HashMap.java:1001)
>         at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>         at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
>         at
>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>         at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
>         at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
>         at
>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>         at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
>         at
>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeObject(StdJDBCDelegate.java:3011)
>         at
>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3036)
>         at
>
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTrigger(StdJDBCDelegate.java:1168)
>         at
>
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1207)
>         ... 5 more
>
> Having a look into TimerData.java shows that timeoutMethod seems to be
> null.
>
> What must be done to get the programmtic timeout running?
>
> Best regards,
> Thomas
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Use-external-database-for-persistent-timer-service-tp4658321p4658373.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>