Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16581

quartz - jobs are not interrupted even if requested

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.6.0
    • 3.12.0
    • camel-quartz
    • 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

          Activity

            People

              davsclaus Claus Ibsen
              rastislav.papp Rastislav Papp
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: