Hi are you sure you share the same db between all servers?
That said I think it only works in failover mode if you don't implement a custom TimerStore (openejb) since default is in memory (load from persistence at startup). Finally does it makes really sense if all instances have their own @Schedule? If yes it means you don't care of @Schedule config since you support timeout trigerring on a single node from multiple nodes so maybe not the right tool. Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2013/12/15 hwaastad <[email protected]>: > Hi, > until now I've just used standard config for my @schedule processes. > However in my quest for clustered setup I've started to look into persistent > storage for quartz. > > Now, I'm quite new to quartz so I might be missing out on something so I > hope you can bear with me :-) > > application.properties: > > org.quartz.scheduler.skipUpdateCheck = true > org.quartz.scheduler.instanceName = TestScheduler > org.quartz.scheduler.instanceId = AUTO > org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool > org.quartz.threadPool.threadCount = 5 > #org.quartz.threadPool.threadPriority = 5 > #org.quartz.jobStore.misfireThreshold = 60000 > #org.quartz.jobStore.clusterCheckinInterval = 20000 > org.quartz.scheduler.jobFactory.class = org.quartz.simpl.SimpleJobFactory > org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX > org.quartz.jobStore.useProperties = false > org.quartz.jobStore.dataSource = QUARTZDS > org.quartz.jobStore.tablePrefix = QRTZ_ > org.quartz.jobStore.isClustered = true > org.quartz.jobStore.driverDelegateClass = > org.quartz.impl.jdbcjobstore.PostgreSQLDelegate > org.quartz.dataSource.QUARTZDS.jndiURL=openejb:Resource/QUARTZDS > > > I'have a singleton with three method annotated similar to this: > > @Schedule(second = "*/4", minute = "*", hour = "*", persistent = true) > public void printHello() { > System.out.println("printHello....." + new Date()); > } > > No other quartz specific configuration is applied. > > If I fire up three servers, the servers are running one distinct > mtehod/process which is what I expect. > However, If I shut down one of the servers, no process is run on the remaing > ones. > Is this how its supposed to work? > The server first fired up in the cluster is showing: > INFO: ClusterManager: detected 1 failed or restarted instances. > des 15, 2013 6:28:42 PM org.quartz.impl.jdbcjobstore.JobStoreSupport > clusterRecover > INFO: ClusterManager: Scanning for instance "helge-ThinkPad1387128403117"'s > failed in-progress jobs. > > > My final goal is to have timer services evenly distributed in my cluster and > having all services run if one node fails. > Is this possible without using quartz specific implementation of jobs? > > TomEE 1.6.0 > best regards, > hw > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/TomEE-and-persistent-timers-tp4666750.html > Sent from the OpenEJB User mailing list archive at Nabble.com.
