Skip to content

Support KEYCLOAK_JDBC_PING2 in custom JGroups stacks by injecting the connection factory - #55250

Draft
ahus1 wants to merge 2 commits into
keycloak:release/26.8from
ahus1:is-54539-backport-26.8
Draft

ahus1 wants to merge 2 commits into
keycloak:release/26.8from
ahus1:is-54539-backport-26.8

Conversation

@ahus1

@ahus1 ahus1 commented Nov 16, 2026

Copy link
Copy Markdown
Member

Backport of #54540 to release/26.8.

Closes #54539

Decisions and assumptions: the cherry-pick conflicted because 26.8 still has the UDP stacks that main removed, so the UDP handling is kept and the custom-stack code is merged alongside it. A second commit adds a unit test for a custom UDP stack, which only applies to this branch.

ahus1 and others added 2 commits November 16, 2026 20:06
… connection factory

Closes keycloak#54539

Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 27ea6c9)
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Relates to keycloak#54539

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
@ahus1
ahus1 requested a balanced review from Copilot November 16, 2026 19:09
@ahus1 ahus1 changed the title [26.8] Support KEYCLOAK_JDBC_PING2 in custom JGroups stacks by injecting the connection factory Support KEYCLOAK_JDBC_PING2 in custom JGroups stacks by injecting the connection factory Nov 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the backport adding custom-stack KEYCLOAK_JDBC_PING2 support.

No open issues 🎉

What changed in this PR

Backports custom-stack KEYCLOAK_JDBC_PING2 support to release/26.8, allowing XML-defined JGroups stacks to use Keycloak’s database connection factory while preserving UDP support.

Changes:

  • Injects the connection factory and supplies default JDBC discovery properties without overriding explicit XML values.
  • Rejects unsupported file-based and cross-site configurations, and narrows the in-JVM test-stack exemption.
  • Adds custom TCP/UDP stack tests and changes a test protocol ID to avoid registration conflicts.
File Description
model/​infinispan/​src/​test/​java/​org/​keycloak/​spi/​infinispan/​impl/​embedded/​JGroupsConfiguratorCustomStackTest.java Tests injection, property defaults, UDP preservation, wrapper naming, and configuration guards.
model/​infinispan/​src/​test/​java/​org/​keycloak/​jgroups/​protocol/​JdbcPing2Test.java Uses a non-conflicting test protocol ID.
model/​infinispan/​src/​main/​java/​org/​keycloak/​spi/​infinispan/​impl/​embedded/​JGroupsConfigurator.java Adds custom-stack wrapping, shared JDBC defaults, and validation while retaining built-in TCP/UDP handling.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support KEYCLOAK_JDBC_PING2 in custom JGroups stacks by injecting the connection factory

2 participants