Skip to content

CAMEL-23276: Add onReload hook to ContextServicePlugin for dev-mode route reloading#22472

Open
Croway wants to merge 2 commits intoapache:mainfrom
Croway:context-service-plugin-onreload-hook
Open

CAMEL-23276: Add onReload hook to ContextServicePlugin for dev-mode route reloading#22472
Croway wants to merge 2 commits intoapache:mainfrom
Croway:context-service-plugin-onreload-hook

Conversation

@Croway
Copy link
Copy Markdown
Contributor

@Croway Croway commented Apr 7, 2026

Summary

  • Adds an onReload() lifecycle hook to ContextServicePlugin, invoked before routes are reloaded in dev mode
  • RouteWatcherReloadStrategy now notifies all registered plugins via ContextServiceLoaderPluginResolver.onReload() before reloading routes
  • Allows plugins to refresh bean references, re-read configuration, or update state before new routes start

Test plan

  • Unit test RouteWatcherReloadStrategyOnReloadTest verifies plugins are invoked on reload
  • Default no-op implementation verified not to throw

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions github-actions bot added the core label Apr 7, 2026
@Croway Croway force-pushed the context-service-plugin-onreload-hook branch from 2892872 to 96a347b Compare April 7, 2026 10:20
@Croway Croway changed the title Add onReload hook to ContextServicePlugin for dev-mode route reloading CAMEL-23276: Add onReload hook to ContextServicePlugin for dev-mode route reloading Apr 7, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant