Quartz Scheduler 2.2有哪些新特性
我们感谢那些提供建议和解决方案的社区贡献者。
API 改变(包括那些向后兼容的问题(breakage))
QTZ-292 - Scheduler interface : in the method scheduleJobs , the triggers should be part of a Set instead of a List
QTZ-304 - Scheduler#scheduleJobs API change to support generics and avoid cast
QTZ-366 - Deleted the long-deprecated CloudscapeDelegate
QTZ-212 - Add schedulerStarting() method to SchedulerListener interface
QTZ-225 - Make the Scheduler’s ClassLoadHelper available to plugins when they are initialized
使用jdbc存储,有一些改变需要在fired_triggers表增加一些列,你可以添加一些sql语句,如下:
for oracle: ALTER TABLE QRTZ_FIRED_TRIGGERS ADD COLUMN SCHED_TIME NUMBER(13) NOT NULL;
for postgresql: ALTER TABLE QRTZ_FIRED_TRIGGERS ADD COLUMN SCHED_TIME BIGINT NOT NULL;
for MySql: ALTER TABLE QRTZ_FIRED_TRIGGERS ADD COLUMN SCHED_TIME BIGINT(13) NOT NULL;
etc.
2.2.0的新特性
QTZ-370 - Ability to override default transaction timeout when beginning new UserTransaction
QTZ-323 - Ability to override worker thread names (when using SimpleThreadPool)
QTZ-79 - Improvements to the out-of-the-box SendMailJob
QTZ-121 - Create an EJB Job invoker that supports EJB3
QTZ-267 - Add new Scheduler method: scheduleJob(JobDetail job, Set trigger) to schedule multiple triggers for a job all at once.
QTZ-272 - Add initialize() to ConnectionProvider interface
QTZ-275 - Allow ‘triggerless’ initial storing of non-durable jobs.
QTZ-315 - Improvements for Job Recovery Information
QTZ-154 - OSGi support
上面的新特性等自己所有的demo都写一遍在翻译。
2.2 中夹杂的一些功能
Quartz现在被分为二个jar文件,一个包含Quartz的全部功能的jar,还有一个the out-of-the-box jobs的jar,https://jira.terracotta.org/jira/browse/QTZ-378
Quartz需要的jre环境是java1.6或者更高版本
性能改进:
提高了一些查询的性能,当使用JDBC存储的时候。
一些内部的SPI/或者接口被重构了或者被清理了,比如DriverDelegate以及其一些子类, Semaphore类等等。
一些bug被修复,具体可以看https://jira.terracotta.org/jira/secure/ReleaseNote.jspa?projectId=10282&version=11041