TomEE is using quartz to implement
@Schedule methods. At the beginning quartz was hidden and its configuration was not exposed.
Since some days it is no more the case!
Now you can specify in several configuration files all quartz properties you want.
Here are the files (to put in META-INF or WEB-INF for webapps):
- openejb-jar.xml in bean properties
The available configuration is well explained on quartz website and can even let you configure quartz in cluster: http://quartz-scheduler.org/documentation/quartz-2.x/configuration/
The nice stuff is now the schedulers can be specific by bean and the schedulers can be monitored/updated through JMX (deactivable if necessary).
Here a little sample of configuration:
org.quartz.scheduler.instanceName = my-app org.quartz.scheduler.instanceId = my-bean org.quartz.threadPool.threadCount = 10 org.quartz.threadPool.class = org.superbiz.MyCustomThreadPool org.quartz.plugin.LogPlugin.class = org.superbiz.MyLogPlugin org.quartz.plugin.LogPlugin.active = true
Another more real example can be found here: http://quartz-scheduler.org/documentation/quartz-2.x/configuration/ConfigJDBCJobStoreClustering
A big thanks to Enrico Olivelli who helped/helps a lot on this topic.