Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Sparkly Quartz 2.0 Release

DZone's Guide to

Sparkly Quartz 2.0 Release

· Java Zone
Free Resource

Try Okta to add social login, MFA, and OpenID Connect support to your Java app in minutes. Create a free developer account today and never build auth again.

Quartz 2.0, Java's Lightweight Open Source Enterprise class Job Scheduler, has been released.  According to the Quartz development team, this release of Quartz represents "the most significant revision of Quartz Enterprise Job Scheduler since the project began over a decade ago."


Overview

Since Terracotta has taken on oversight of the Quartz development project, several incremental improvements have been made.  The new Quartz 2.0 improvements refine where the code executes (as opposed to when the code is executed).  Steven Harris, Terracotta developer and blogger describes this shift of focus:

With Quartz Scheduler 2.0 we've now added that "Where." This is about where code executes. Instead of randomly choosing a node for job execution in a scaled-out architecture you can now create constraints that help make the decision based on "Where" it should be executed.


The user can designate the "where" of code execution based upon resource availability, ehcache's data locality, or static allocation.

Using the new builder API, CodeSpot gives us a great example of how Quartz 2.0 location designation works in real time.:

LocalityJobDetail jobDetail =
    localJob(
        newJob(ImportantJob.class)
            .withIdentity("importantJob")
            .build())
        .where(
            node()
                .is(partOfNodeGroup("fastNodes")))
        .build();

 

New Features List

  • API Changes: the new API uses collections and generics, resulting in fewer ambiguities and redundancies.  In addition, a Domain Specific Language (DSL) has been introduced for handling jobs and triggers (i.e. core entities).  Hide and remove methods are no longer public to client code.
  • General Changes: a multitude of improvements have been made to overall performance, batching, and the XML file schema.  As expected, Quartz 2.0 includes several significant bug fixes. Check out this link for a complete list of bug fixes. 

Build and launch faster with Okta’s user management API. Register today for the free forever developer edition!

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}