You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Gary Hodgson (Jira)" <ji...@apache.org> on 2019/11/07 22:14:00 UTC

[jira] [Created] (DELTASPIKE-1396) Potential discrepancy in AbstractQuartzScheduler.stop of Scheduler Module

Gary Hodgson created DELTASPIKE-1396:
----------------------------------------

             Summary: Potential discrepancy in AbstractQuartzScheduler.stop of Scheduler Module
                 Key: DELTASPIKE-1396
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1396
             Project: DeltaSpike
          Issue Type: Bug
      Security Level: public (Regular issues)
            Reporter: Gary Hodgson


The stop method calls the shutdown method of the Quartz scheduler with the base config of "deltaspike.scheduler.force_stop":

  this.scheduler.shutdown(SchedulerBaseConfig.LifecycleIntegration.FORCE_STOP);

  ([https://github.com/apache/deltaspike/blob/master/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/AbstractQuartzScheduler.java#L161])


However the parameter is called waitForJobsToComplete

     * @param waitForJobsToComplete
     *          if <code>true</code> the scheduler will not allow this method
     *          to return until all currently executing jobs have completed.

which means the config actually does the opposite of what it intends, i.e. deltaspike.scheduler.force_stop=true would actually wait for the executing jobs to complete rather than stopping immediately.

I presume this would be fixed by negating the parameter:

  this.scheduler.shutdown(!SchedulerBaseConfig.LifecycleIntegration.FORCE_STOP);



 

Mailing List Thread: [https://lists.apache.org/thread.html/366d51433ea5c5deb7e1d83e09891e426bff9cae0eb6bff98990eb40@%3Cusers.deltaspike.apache.org%3E]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)