Triggering Quartz job from JSF (Any front end)- How to wait for the job execution to be over
- by Maximus
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 !