Here it is: https://github.com/eiskonzept/tomee.git 
Just start tomee plugin with node1 profile, open <context_path>/schedule.xhtml 
and push "Schedule timer" Button. 
Timer is scheduled(executed every second, see log) and listed on the page. 
Restart application, open <context_path>/schedule.xhtml again. There are no 
scheduled timers.

-----Ursprüngliche Nachricht-----
Von: Romain Manni-Bucau [mailto:[email protected]] 
Gesendet: Montag, 4. März 2013 17:56
An: [email protected]
Betreff: Re: CalendarTimers created with TimerService and persistent=true are 
not persisted over tomee restart

can you reproduce the sample in a simple example? (with the datasource 
intialized etc)

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/3/4 <[email protected]>

> I use TomEE 1.6.0-Snapshot(and have tested with 1.5.1 and 
> 1.5.2-Snapshot too, with same result).
>
> Tried proposed configuration, with same result. There is my version 
> with adjusted jndi names and driverDelegateClass:
>
> org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
> org.quartz.jobStore.dataSource=testDS
> org.quartz.jobStore.nonManagedTXDataSource = testDSNonJta 
> org.quartz.scheduler.instanceName = myScheduler 
> org.quartz.jobStore.isClustered=true
>
> org.quartz.jobStore.driverDelegateClass = 
> org.quartz.impl.jdbcjobstore.HSQLDBDelegate
> org.quartz.dataSource.testDS.jndiURL=openejb:Resource/jdbc/testDS
>
> org.quartz.dataSource.testDSNonJta.jndiURL=openejb:Resource/jdbc/testD
> SNonJta
>
> -----Ursprüngliche Nachricht-----
> Von: Romain Manni-Bucau [mailto:[email protected]]
> Gesendet: Montag, 4. März 2013 17:23
> An: [email protected]
> Betreff: Re: CalendarTimers created with TimerService and 
> persistent=true are not persisted over tomee restart
>
> the config should more or less work:
>
> http://openejb.979440.n4.nabble.com/new-Quartz-configuration-not-worki
> ng-for-cluster-deployment-td4656540.html#a4656541
>
> which version do you use?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/3/4 <[email protected]>
>
> > 4 files are created in project root(I start tomee maven plugin here):
> >
> > "\test.db.lck"
> > "\test.db.log"
> > "\test.db.properties"
> > "\test.db.script"
> >
> > I have purged all this files, then restarted TomEE, scheduled a job 
> > and stopped TomEE after a while. Please find attached test.db.log file.
> >
> > -----Ursprüngliche Nachricht-----
> > Von: John D. Ament [mailto:[email protected]]
> > Gesendet: Montag, 4. März 2013 16:56
> > An: [email protected]
> > Betreff: Re: CalendarTimers created with TimerService and 
> > persistent=true are not persisted over tomee restart
> >
> > Yes, that file.  Where does it end up getting created?
> >
> >
> > On Mon, Mar 4, 2013 at 10:49 AM, <[email protected]> wrote:
> >
> > > Sorry, don't get your question. Which file do you mean? Test.db?
> > >
> > > -----Ursprüngliche Nachricht-----
> > > Von: John D. Ament [mailto:[email protected]]
> > > Gesendet: Montag, 4. März 2013 15:17
> > > An: [email protected]
> > > Betreff: Re: CalendarTimers created with TimerService and 
> > > persistent=true are not persisted over tomee restart
> > >
> > > Are you able to query that file to see the contents? What's in 
> > > there as your application is running?
> > >
> > >
> > > On Mon, Mar 4, 2013 at 8:12 AM, <[email protected]> wrote:
> > >
> > > > Hi.
> > > >
> > > > CalenderTimers created with following code are not recovered 
> > > > after TomEE restart. Are there some TomEE properties to make 
> > > > timers persistent across restarts?
> > > > There is issue reproduction:
> > > > https://github.com/eiskonzept/tomee.git
> > > > Just start tomee plugin with node1 profile, open 
> > > > <context_path>/schedule.xhtml and push "Schedule timer" Button.
> > > > Timer is scheduled(executed every second, see log) and listed on 
> > > > the
> > > page.
> > > > Restart application, open <context_path>/schedule.xhtml again.
> > > > There are no scheduled timers.
> > > >
> > > >
> > > > Regards.
> > > > Dmitry Volkov.
> > > >
> > > > Timer creation:
> > > >     @Resource
> > > >     private TimerService timerService;
> > > >
> > > >     @Override
> > > >     @Timeout
> > > >     public void scheduleMe() {
> > > >         log.warn("Scheduled method executed. " + new
> > Date().toString());
> > > >     }
> > > >
> > > >     @Override
> > > >     public void schedule() {
> > > >         ScheduleExpression schedule = new ScheduleExpression();
> > > >         schedule.hour("*");
> > > >         schedule.minute("*");
> > > >         schedule.second("*");
> > > >         timerService.createCalendarTimer(schedule, new 
> > > > TimerConfig(null, true));
> > > >     }
> > > >
> > > > Quartz config:
> > > >         org.quartz.scheduler.instanceName = myScheduler
> > > >         org.quartz.scheduler.instanceId = instance1
> > > >
> > > >
> org.quartz.scheduler.threadsInheritContextClassLoaderOfInitializer=tru
> e
> > > >         org.quartz.scheduler.makeSchedulerThreadDaemon=true
> > > >         org.quartz.jobStore.makeThreadsDaemons=true
> > > >         org.quartz.jobStore.dataSource = testDS
> > > >         org.quartz.jobStore.nonManagedTXDataSource = testDSNonJta
> > > >         org.quartz.threadPool.threadCount = 10
> > > >         org.quartz.jobStore.class = 
> > > > org.quartz.impl.jdbcjobstore.JobStoreCMT
> > > >         org.quartz.jobStore.driverDelegateClass = 
> > > > org.quartz.impl.jdbcjobstore.HSQLDBDelegate
> > > >         org.quartz.jobStore.isClustered = true
> > > >         org.quartz.jobStore.tablePrefix = QRTZ_
> > > >
> > > >         org.quartz.dataSource.testDS.jndiURL=java:/jdbc/testDS
> > > >
> > > > org.quartz.dataSource.testDSNonJta.jndiURL=java:/jdbc/testDSNonJ
> > > > ta
> > > >
> > > > DataSource config:
> > > >     <Resource id="jdbc/testDS" type="javax.sql.DataSource">
> > > >         JdbcDriver org.hsqldb.jdbcDriver
> > > >         JdbcUrl jdbc:hsqldb:file:test.db
> > > >         UserName sa
> > > >         Password
> > > >         JtaManaged true
> > > >         ConnectionProperties
> > > >     </Resource>
> > > >
> > > >     <Resource id="jdbc/testDSNonJta" type="javax.sql.DataSource">
> > > >         JdbcDriver org.hsqldb.jdbcDriver
> > > >         JdbcUrl jdbc:hsqldb:file:test.db
> > > >         UserName sa
> > > >         Password
> > > >         JtaManaged false
> > > >         ConnectionProperties
> > > >     </Resource>
> > > >
> > > >
> > > >
> > >
> >
>

Reply via email to