Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.6.0
-
None
-
Unknown
Description
camel-quartz provides option interruptJobsOnShutdown, which says the running jobs will be interrupted.
org.apache.camel.component.quartz.CamelJob does not implement org.quartz.InterruptableJob though, so when shutting down the scheduler, the running jobs in fact will not be interrupted, as per implementation of org.quartz.core.QuartzScheduler#shutdown(boolean):
... if(job.getJobInstance() instanceof InterruptableJob) try { ((InterruptableJob)job.getJobInstance()).interrupt(); } ... ...
The job thread stays running, and does not get any information about the scheduler shutdown.
Also, if it worked, I would like to be able to configure the behavior in quartz.properties (which I supply to QuartzComponent), as opposed to configuring it on the QuartzComponent itself.
At this moment, it is needed to supply the interruptJobsOnShutdown to the QuartzComponent, even if my quartz.properties already contains org.quartz.scheduler.interruptJobsOnShutdown=true.
Attachments
Issue Links
- is related to
-
CAMEL-10749 Quartz2 interrupt job
- Resolved