davsclaus commented on PR #27080: URL: https://github.com/apache/camel/pull/27080#issuecomment-5891401097
Thanks @allthingssecurity, good suggestion. Widened in 34b359c1b66b: `InternalServiceManager.shutdownServices` now keeps the services it stops (in the order they were added, and how they were added: `forceStart` / `useLifecycleStrategies`), and a restart registers them again the same way. This replaces the list of fields in `reRegisterServices()` and covers the context plugins that are services, a debugger set with `setDebugger`, and services added with `addService`. - The injector is skipped, as a new one is created on restart. - A service removed with `removeService` while CamelContext is stopped is not registered again. - Keeping how each service was added matters: re-adding everything with the defaults started the stream caching strategy before CamelContext enabled it (`StreamCachingStrategyRestartTest` caught that). `CamelContextRestartInternalServicesTest` now checks the period task scheduler, the async processor await manager, bean introspection, a debugger and an added service across a restart; that test fails without this change. Full camel-core (7968 tests) and camel-management (509) pass locally. _Claude Code on behalf of davsclaus_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
