You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/06/24 13:55:00 UTC

[jira] [Assigned] (CAMEL-16581) quartz - jobs are not interrupted even if requested

     [ https://issues.apache.org/jira/browse/CAMEL-16581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-16581:
-----------------------------------

    Assignee: Claus Ibsen

> 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
>            Assignee: Claus Ibsen
>            Priority: Major
>
> 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)