Triggering Quartz job from JSF (Any front end)- How to wait for the job execution to be over
Posted
by
Maximus
on Stack Overflow
See other posts from Stack Overflow
or by Maximus
Published on 2011-02-10T23:05:41Z
Indexed on
2011/02/10
23:25 UTC
Read the original article
Hit count: 213
I am developing a front end to trigger a quartz job on the fly. I have a form in the JSF page whose click action will dynamically trigger a quartz job.
The job is invoked by the following statement, the job is triggered and everything works fine.
scheduler.triggerJob("Job1",Scheduler.DEFAULT_GROUP,jobDataMap);
From what I understand the job seems to run in a separate thread and the execution of the calling function does not wait for the job to be over.
Since I am invoking the job from front end, I would like to wait till the job is over before I navigate to a different JSF page. So I can display an error message if the job fails. I would also like to display a message to the user, "Processing job, please wait.." until the job is actually over.
Any ideas on how to accomplish this will be appreciated.
Thanks !
© Stack Overflow or respective owner