Utilize Quartz to Implement Scheduling Service

Post on 25-May-2015

1.644 views 2 download

Tags:

Transcript of Utilize Quartz to Implement Scheduling Service

+

Utilize Quartz to Implement Scheduling Service

Albert Guojunyuo@gmail.com

+Agenda

Scenario

Quartz

Implementation Process define job class define scheduler

create a simple, RAM-based scheduler create a job which is schedule to run at specific time

every day register job to scheduler The scheduler is then started

+

Resume RepositoryResume

Repository

Scenario

Transfer resume to HTC once a day

Recruiting System

Retrieve resume from resume repository once a day

+Quartz

What is Quartz Quartz is a full-featured, open source job scheduling system

that can be integrated with, or used along side virtually any J2EE or J2SE application - from the smallest stand-alone application to the largest e-commerce system.

Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs; jobs whose tasks are defined as standard Java components or EJBs.

The Quartz Scheduler includes many enterprise-class features, such as JTA transactions and clustering.

http://www.opensymphony.com/quartz/

+Implementation Process

+Job & Scheduler Class

Define your job in this class

Define your scheduling service in this servletclass

+Job Class

Define job execution stuff into execute method

+Scheduler

+Define Schedule Servlet in web.xml

+Check Console