Over a million developers have joined DZone.

Quartz Library Migration After Many Years

· Java Zone

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

Weeks ago, the company I'm working at announced that the management decided to upgrade our Spring library we are using from Spring 1.x to Spring 3.0.6. And the task for me was upgrading the Quartz framework from version 1.3.x to 2.1.

The project's actually only been using a narrow set  features available in Quartz so I guessed there would be no big refactoring needed. But unfortunately I was shocked with how big the changes were in Quartz. Looking at the Quartz source code made me realize that our Quartz was wayyyy older than the current 2.1 version. It's been more than 6 years and I was still at university at that time.

Some classes now have become interfaces and there are new ways to instantiate some classes. JobDetail and Trigger are now an interface instead of classes. I used to create JobDetail directly using new and now there is JobBuilder class to create JobDetail. Trigger is now created using TriggerBuilder instead of instantiating using new.

It's also interesting that name and group information for Job and Trigger are wrapped inside JobKey and TriggerKey instead of passing Strings.

 

But anyway, Spring 3 hasn't supported Quartz 2.x yet  so we decided to upgrade from Quartz 1.3.x to 1.8.5.

Moral of the story.  Don't wait years to upgrade important libraries.

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}