How do I make a Quartz job wait for another task that is fired by ApplicationListener?

StackOverflow https://stackoverflow.com/questions/21938188

  •  14-10-2022
  •  | 
  •  

So, I have a Quartz job, and an ApplicationListener that gets fired when the Quartz job is done. My problem is that any finalization that I do in the listener will create a race condition for the code that polls to check if the Quartz job is done. Basically I want either make the Quartz job wait for the ApplicationListener to start and finish before considering itself done.

Is this even possible? Am I mixing frameworks?

有帮助吗?

解决方案

Turns out my issue was lack of familiarity with the code base. Everything was wired correctly, but I used the wrong JobKey to search for listeners before allowing the main job to shut down. Sorry to waste your time guys.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top