pderop commented on PR #598: URL: https://github.com/apache/felix-dev/pull/598#issuecomment-7171580156
> Nit: init() guards on m_context != null, so after a DM stop/start without refresh the old context stays. Same as before, not a regression. Thanks! Agreed, this is not a regression, and I'd rather not change it in this PR: a stop/start of the DM bundle without refresh can't be fully supported as is. The components created before the stop keep their interceptors on the old cache, whose listeners were removed by the framework when the DM bundle was stopped, and their bundles are not restarted. The supported way is a refresh: it creates a new wiring of the DM bundle, with a new class loader, so the static state of `ServiceRegistryCacheManager` starts from scratch (new context, new cache), and the bundles using DM are refreshed too, so their components use the new cache. Commit [e1f97f2](https://github.com/apache/felix-dev/pull/598/commits/e1f97f2e51c5c65f795f4821beec12134d6a0564) adds an integration test for this, `FELIX6874_DependencyManagerRefreshTest` (new modules `index.itest.refresh.tests` and `index.itest.refresh.bundle`). With an `objectClass` index configured by the system property, it refreshes the DM bundle and checks that a service dependency works before and after the refresh, including for a service registered after the refresh, and that the update of the service properties is propagated. Supporting a stop/start without refresh would need a larger change (recreating the cache at each start, closing it at stop, and rebinding the existing components to the new cache), so if we want it, I suggest doing it in a separate PR. -- 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]
