|
From: Colin S. <col...@ex...> - 2004-02-18 23:02:22
|
I would actually be able to use this, since right now I am setting up=20 some quartz jobs by hand. I don't know however if I will have time to=20 switch over my quartz usage to this in the next few weeks. That code is=20 working fine and I am in a time crunch. They obviously don't pose much danger to the rest of spring since it is=20 all new code, and if they have unit tests that covers the actual new=20 code, so from my point of view, go for it... j=FCrgen h=F6ller [werk3AT] wrote: >Everybody, >=20 >I've revived my Quartz support classes for Spring today. They emerged fr= om a job scheduling consulting project I did in autumn 2003. We have conc= rete needs for this now at werk3AT, thus the revival: It's about quite si= mple cron-style scheduling of application jobs. >=20 >The basic idea is to set up a Quartz Scheduler via a SchedulerFactoryBea= n, also allowing to register scheduled jobs there via a <list> of <refs> = to ScheduledJobDefinition beans. A ScheduledJobDefinition is just a simpl= e combination of a Quartz JobDetail and a Quartz Trigger. >=20 >ScheduledJobDefinition bean implementations include: >- DefaultScheduledJobDefinition, allowing to use any implementation of Q= uartz' Job interface with a declaratively configured job data map and cro= n 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 lin= k 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 Spr= ing. Typically no rescheduling or the like: All schedules are set up on c= ontext startup, defined as bean definitions. Of course, you can also fetc= h the Scheduler instance and perform any custom scheduling, instead of us= ing preconfigured ScheduledJobDefinition beans. >=20 >The typical usage scenario are low-level jobs within an application, lik= e data synchronization or storage cleanup - all predefined jobs that are = just customized by an administrator. Fits nicely into Spring's applicatio= n context model; most jobs will simply delegate to Spring-managed busines= s 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 fi= nal, 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.spr= ingframework.scheduling.quartz". >=20 >If there are no general objections, I'll commit it by the end of this we= ek, for review within the next week - still plenty of time before 1.0 fin= al ;-) Looking forward to your feedback!=20 >=20 >Juergen >=20 > |