Ensure purgeTablesBean uses the correct datasource during clean operation#134
Merged
jamesfredley merged 2 commits intoapache:2.0.xfrom Dec 17, 2024
Merged
Ensure purgeTablesBean uses the correct datasource during clean operation#134jamesfredley merged 2 commits intoapache:2.0.xfrom
jamesfredley merged 2 commits intoapache:2.0.xfrom
Conversation
Update purgeTablesBean to dynamically resolve dataSource
Contributor
Author
|
I created the PR for version 2.0, but this issue is also present in the current version. I have opened another PR for the current version as well. |
Kpotz
approved these changes
Dec 10, 2024
Contributor
Contributor
Author
Currently, we are using version 2.0.13 of Quartz in our production application. Ideally, I would need this solution for the 2.0.x version. Is that possible? |
Contributor
|
@jpdev01 yes, we will do it for 2.0.x, 3.0.x and 4.0.x. |
amondel2
approved these changes
Dec 17, 2024
Contributor
|
#137 - merging up to 3.0.x |
Contributor
|
#138 merging up to 4.0.x |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, when running the clean operation, the purgeTablesBean incorrectly targeted the main application dataSource instead of the jdbcStoreDataSource specified in the Quartz properties.
This PR updates the configuration of purgeTablesBean to dynamically resolve the dataSource based on the org.quartz.jdbcStoreDataSource property. If this property is not defined, it will fallback to the default dataSource.
Updated the purgeTablesBean to use properties['org.quartz.jdbcStoreDataSource'] ?: 'dataSource' for resolving the dataSource.
Ensures the clean operation now targets the correct database when jdbcStoreDataSource is provided.
This fix prevents unintended operations on the main application database when a custom jdbcStoreDataSource is configured.
Verified that clean operations now correctly use the jdbcStoreDataSource when specified.
Confirmed fallback to the main dataSource when org.quartz.jdbcStoreDataSource is not configured.