You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Rastislav Papp (Jira)" <ji...@apache.org> on 2021/05/05 11:33:00 UTC
[jira] [Created] (CAMEL-16581) quartz - jobs are not interrupted
even if requested
Rastislav Papp created CAMEL-16581:
--------------------------------------
Summary: quartz - jobs are not interrupted even if requested
Key: CAMEL-16581
URL: https://issues.apache.org/jira/browse/CAMEL-16581
Project: Camel
Issue Type: Bug
Components: camel-quartz
Affects Versions: 3.6.0
Reporter: Rastislav Papp
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)}}:
{code:java}
...
if(job.getJobInstance() instanceof InterruptableJob)
try {
((InterruptableJob)job.getJobInstance()).interrupt();
}
...
...
{code}
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}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)