You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2019/11/07 22:37:01 UTC
[jira] [Commented] (DELTASPIKE-1396) Incorrect parameter meaning in
AbstractQuartzScheduler.stop of Scheduler Module
[ https://issues.apache.org/jira/browse/DELTASPIKE-1396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969612#comment-16969612 ]
ASF subversion and git services commented on DELTASPIKE-1396:
-------------------------------------------------------------
Commit 4794da1f7cd2e566a4c241c8ea6d74ee523d3c3a in deltaspike's branch refs/heads/master from Mark Struberg
[ https://gitbox.apache.org/repos/asf?p=deltaspike.git;h=4794da1 ]
DELTASPIKE-1396 inverted waitForJobsToComplete logic
txs to Gary Hodgson for the report and catch!
> Incorrect parameter meaning 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
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The AbstractQuartzScheduler.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)