Skip to content

Conversation

@dimas-b
Copy link
Contributor

@dimas-b dimas-b commented Jan 10, 2026

Use injected RealmConfig in JdbcMetaStoreManagerFactory

  • Improve code isolation by using RealmConfig (like most other code)
    instead of the lower-level PolarisConfigurationStore

  • This also enabled proper CDI request-scoped injection in concert with Use new Request Context for each realm during implicit bootstrap #3411

  • Additionally, this enables further code cleanup in PolarisConfigurationStore
    as discussed in Refactor PolarisConfigurationStore to streamline value typing #3324 with the goal of using this interface for the backend
    configuration code, while RealmConfig becomes the corresponding frontend
    interface.

  • Fix ServiceProducers.realmConfig() to make a RealmConfigImpl directly from
    its dependencies (not from CallContext) to avoid cycles in CDI.

Checklist

  • 🛡️ Don't disclose security issues! (contact [email protected])
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

The implicit (auto) bootstrap calls used to share Request Context
for potentially many realms. That used to work by coincidence because
`RealmConfig`, for example, is a `RequestScoped` bean.

With this change each realm will be bootstrapped in its own dedicated
Request Context.

This change lays down a foundation for future refactoring related to `RealmConfig`.
* Improve code isolation by using `RealmConfig` (like most other code)
  instead of the lower-level `PolarisConfigurationStore`

* This also enabled proper CDI request-scoped injection in concert with apache#3411

* Additionally, this enables further code cleanup in `PolarisConfigurationStore`
  as discussed in apache#3324 with the goal of using this interface for the backend
  configuration code, while `RealmConfig` becomes the corresponding frontend
  interface.

* Fix `ServiceProducers.realmConfig()` to make a `RealmConfigImpl` directly from
  its dependencies (not from `CallContext`) to avoid cycles in CDI.
@github-project-automation github-project-automation bot moved this to PRs In Progress in Basic Kanban Board Jan 10, 2026
@dimas-b dimas-b changed the title Jdbc realm config Use injected RealmConfig in JdbcMetaStoreManagerFactory Jan 10, 2026
@dimas-b
Copy link
Contributor Author

dimas-b commented Jan 10, 2026

Draft for now as this PR depends on #3411. Open for comments.

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.

1 participant