[
https://jira.jboss.org/jira/browse/JBSEAM-4399?page=com.atlassian.jira.pl...
]
Nikolay Elenkov commented on JBSEAM-4399:
-----------------------------------------
Example usage:
Asynchronous method:
@Asynchronous
@Transactional
public QuartzTriggerHandle schedulePayment(@Expiration Date when,
@IntervalDuration Long interval, @JobName String jobName, Payment payment)
{
....
}
Client code:
QuartzTriggerHandle handle = processor.schedulePayment(new Date(), 60 * 60 * 1000,
"schedulePaymentJob", payment);
This register the following job and trigger with Quartz:
job: "schedulePaymentJob"
trigger: "schedulePaymentJobTrigger"
Specify the Quartz job name for @Asynchronous methods
-----------------------------------------------------
Key: JBSEAM-4399
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4399
Project: Seam
Issue Type: Feature Request
Affects Versions: 2.2.0.GA
Environment: JBoss 4.2.x, JBoss 5.x, Quartz
Reporter: Nikolay Elenkov
Attachments: quartz-job-name.patch
When using the Quartz dispatcher, Seam implements asynchronous methods by creating Quartz
job and trigger
for every method, annotated with @Asynchronous. The QuartzDispatcher class uses UIDs for
the job and trigger names,
in order to generate unique names. While this is OK for one-off jobs and asynchronous
events, it is not suitable for
repeatable and cron jobs that might have to be paused, cancelled or rescheduled by the
application. Jobs should
have meaningful names, especially when they are saved in a database store.
Requesting a means to specify the Quartz job name when declaring an asynchronous method.
One way to do
this is to add a new parameter annotation, JobName. The Quartz dispatcher should inspect
the asynchronous
method parameters and use the one annotated with @JobName (if any) as the base for the
job/trigger name.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira