|
From: <jue...@we...> - 2004-02-18 22:48:10
|
Everybody, =20 I've revived my Quartz support classes for Spring today. They emerged = from a job scheduling consulting project I did in autumn 2003. We have = concrete needs for this now at werk3AT, thus the revival: It's about = quite simple cron-style scheduling of application jobs. =20 The basic idea is to set up a Quartz Scheduler via a = SchedulerFactoryBean, also allowing to register scheduled jobs there via = a <list> of <refs> to ScheduledJobDefinition beans. A = ScheduledJobDefinition is just a simple combination of a Quartz = JobDetail and a Quartz Trigger. =20 ScheduledJobDefinition bean implementations include: - DefaultScheduledJobDefinition, allowing to use any implementation of = Quartz' Job interface with a declaratively configured job data map and = cron trigger - MethodInvokingJobDefinition, allowing to specify a method of a = Spring-managed bean to execute as job (completely declarative, without = the need for implementing a custom Job object), with a cron trigger. =20 Both job definition beans can link in a separate Quartz Trigger instance = instead of a cron expression; DefaultScheduledJobDefinition can also = link in a separate Quartz JobDetail instance instead of a job class. =20 That's all there is: A simple declarative way of using Quartz within = Spring. Typically no rescheduling or the like: All schedules are set up = on context startup, defined as bean definitions. Of course, you can also = fetch the Scheduler instance and perform any custom scheduling, instead = of using preconfigured ScheduledJobDefinition beans. =20 The typical usage scenario are low-level jobs within an application, = like data synchronization or storage cleanup - all predefined jobs that = are just customized by an administrator. Fits nicely into Spring's = application context model; most jobs will simply delegate to = Spring-managed business objects. =20 I expect to have this polished by the end of the week, as we need it at = werk3AT quite urgently. I'd like to include this already in Spring 1.0 = final, as it's just 6 pretty simple classes (yes, I know - feature = freeze - never mind ;-). The main question is where to put it: I suggest = "org.springframework.scheduling.quartz". =20 If there are no general objections, I'll commit it by the end of this = week, for review within the next week - still plenty of time before 1.0 = final ;-) Looking forward to your feedback!=20 =20 Juergen =20 |