synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dinusha Dilrukshi <>
Subject Re: Upgrading quartz version used in synapse-task
Date Thu, 12 Jan 2012 16:56:34 GMT
Hi Hiranya,

Please find the JIRA created to track this in link[1]. And also note that,
other than the synapse-task, synapse-massage-processors code also need to
change according to the quartz2. I ll make necessary changes to that as

As a summarization of major API changes,

1. DSLs for working with jobs and triggers and builder-based API for
construction Jobs and Triggers. Set of new classes has been introduced to
handle Jobs and Triggers : *TriggerBuilder, JobBuilder,
SimpleScheduleBuilder, CronScheduleBuilder,
CalendarIntervalSchedulerBuilder, DateBuilder*. This will simplify current
code and make it more clear, readable, and maintainable.
For example,
*Old code:*

SimpleTrigger trg = new SimpleTrigger("myTrigger", null);
trg.setStartTime(new Date(System.currentTimeMillis() + 10000L));

*New code:*

Trigger trg = newTrigger()
    .startAt(futureDate(10, IntervalUnit.SECONDS))

2. Job and Trigger identification is now based on *JobKey* and *TriggerKey*.
Keys include both name and group. So all the methods which operate on
particular jobs/triggers now take keys as the parameter.
For examples,
*                 - getTrigger(TriggerKey key): Trigger*, rather than
name, String group): Trigger*.
                 - deleteJob(JobKey jobKey): boolean, rather than
 deleteJob(String name, String group): boolean.

3. Introduce of Interfaces instead of classes,
For example,
                 - *Trigger* is now an interface, rather than a class.
Likewise for *SimpleTrigger*, *CronTrigger*, etc.
                 - JobDetail is now an interface.

4. Collections and generics-- getJobGroupNames(): List<String>, no more use
of arrays to get groups of job details, triggers, other clumps of data from
the scheduler

Further details about API changes can be found in discussion link [2] and
 link [3].



On Wed, Jan 11, 2012 at 9:24 PM, Hiranya Jayathilaka

> Hi Dinusha,
> On Wed, Jan 11, 2012 at 6:24 PM, Dinusha Dilrukshi <
> > wrote:
>> Hi,
>> Current synapse-task implementation has used quartz 1.6.0 version which
>> is something old. The quartz latest stable version 2.1.1 seem to have many
>> functional improvements and new features over 1.6.0 version. So it will be
>> a good idea to upgrade quartz version to 2.1.1 to have future enhancements
>> in synapse-task.
>> Refer to the document what's new in quartz2 [1]
>> [1]
>> <>I
>> would happy to provide a patch for this.
> Sounds great. Please do provide a patch through the JIRA. BTW can you
> please summarize what are the major API changes between the 2 versions of
> Quartz?
> Thanks,
> Hiranya
>> ~Dinusha~
> --
> Hiranya Jayathilaka
> Associate Technical Lead;
> WSO2 Inc.;
> E-mail:;  Mobile: +94 77 633 3491
> Blog:

View raw message