allthingssecurity commented on PR #28642: URL: https://github.com/apache/camel/pull/28642#issuecomment-6490352930
@davsclaus thanks for the review. I implemented your alternative in 8cd87b63850f (one new commit on top); e07c4eddd0ec then merges main into the branch, because main gained a 4.24 upgrade-guide entry at the end of the file (main's sections first; no code change in the merge). - Marker: `pauseTrigger` writes `CamelQuartzTriggerPausedByCamel` before it pauses, and `resumeTrigger` removes it. At start, an endpoint resumes a `PAUSED` trigger only if it carries the mark. The mark is in the `JobDataMap` of the trigger's **job**, not of the trigger: a stored trigger's map can only be changed through `rescheduleJob`, which computes the fire times again and restarts a `SimpleTrigger`'s count. Replacing the job (`addJob(job, true, true)`) keeps its triggers and their state. - So a trigger paused outside Camel (Quartz API, JMX, `pauseAll`) stays paused after a reload or a restart. I also made the same-route stop/start consistent: `pauseTrigger` no longer counts an already paused trigger as its own pause, so it no longer resumes an ops pause either (main did; the guide says so). Three new tests; without the mark they fail with `expected: <PAUSED> but was: <NORMAL>`. - Docs: a "Keeping the trigger when the route stops" section in quartz-component.adoc, and the upgrade-guide entry rewritten, including that a trigger paused by an older Camel has no mark and must be resumed once. The `deleteJob`/`pauseJob` option javadoc is unchanged: "reuse a pre-configured trigger" still holds, and changing it would regenerate catalog and DSL files. - H2 restart test: its own database and scheduler name per run, and both applications are closed in a `finally`. Checked with a forced first-run failure plus a surefire rerun: the rerun now passes, while the old test failed at `tables_h2.sql`. - The guide conflict with #28638: whichever of the two lands second gets main merged in. camel-quartz: 121 tests, 0 failures; the two test classes passed 20 runs each in one JVM. Known limit, in the body: with `stateful=true`, a job execution that ends just as the route pauses its trigger writes its `JobDataMap` back without the mark, and the trigger then stays paused after a restart, as on main. It never resumes a pause made outside Camel. _Claude Code on behalf of allthingssecurity_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
