|
From: <jue...@we...> - 2004-02-26 06:34:07
|
That's a case for programmatic registration with the Quartz scheduler. =
The Scheduler is easy available via the SchedulerFactoryBean; if you set =
it up as "scheduler", simply access the bean like as follows:
=20
Scheduler scheduler =3D context.getBean("scheduler");
JobDetail jobDetail =3D new JobDetail(...);
Trigger trigger =3D new Trigger(...);
scheduler.scheduleJob(jobDetail, trigger);
=20
The declarative registration via XML bean definitions is just a =
convenient way of registering pre-defined jobs. The usual Quartz way of =
programmatic registration is the way to go for dynamic scheduling.
=20
Note that SchedulerFactoryBean automatically shuts down the Quartz =
scheduler on context shutdown.=20
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Raymond Lai
Gesendet: Do 26.02.2004 04:10
An: spr...@li...
Betreff: [Springframework-developer] Re: Quartz support
Hi,
Great to see Quartz support is here now.
From the imagedb example in CVS I could see how can I
set up scheduled tasks which the parameters may not be
dynamic. But what if I I want to set up tasks will
have dynamic parameters?
Say, an user placed an item for others to bid. As a
result a task is being created, and filled with
parameters like the user's ID, and item's ID, etc. and
a trigger with the task's execution time specified by
the user, which are set in code, instead of in
applicationContext.xml.
Any hint for me to dig deeper?
TIA,
Raymond
__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|