[WFLY-22003] Replace JPA initialization with JDBC CDI bean - #1197
Open
Riovo wants to merge 1 commit into
Open
Conversation
Riovo
marked this pull request as draft
August 12, 2026 00:26
Riovo
marked this pull request as ready for review
August 12, 2026 11:00
luck3y
approved these changes
Aug 13, 2026
luck3y
left a comment
Contributor
There was a problem hiding this comment.
LGTM, I added some suggestions, feel free to disagree :)
emmartins
requested changes
Aug 13, 2026
Contributor
|
Personally I dislike the usage of an EJB for this, I know this was suggested in the original JIRA but EJB is kind of legacy and considered an expensive resource, I suggest instead either:
Either requires no changes to the CLI script, or aditional dependencies. PS: Ken remarks would still need to be considered. |
Riovo
marked this pull request as draft
August 17, 2026 09:24
Riovo
marked this pull request as ready for review
August 17, 2026 10:28
Author
|
Thank you @emmartins and @luck3y for your comments. I have since implemented everything, please let me know if everything is good or if changes need to be done. |
emmartins
requested changes
Aug 17, 2026
Contributor
|
@Riovo please squash all commits into one too :) |
Author
Hehe will do, thank you for you time :) |
Author
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.
Fixes: https://redhat.atlassian.net/browse/WFLY-22003
Replaces the current JPA-based database initialization with a CDI bean using direct JDBC. This eliminates the WildFly Glow unbound datasource warning that popped up because persistence.xml referenced a CLI-defined datasource.
The CDI bean observes application startup (@observes @initialized(ApplicationScoped.class)) to initialize the H2 database schema and test users for the Elytron JDBC realm.