|Re: [equinox-dev] ResolverHook on startup|
You are correct, the resolver hooks are not called when reifying the bundle wiring. Instead we reify the wires exactly as they were when the framework was shutdown. No resolve process is done in this process. The assumption is that the resolver hooks were present when the framework shutdown and the resolution state was persisted in the exact way the resolver hooks want when the framework is restarted. It is the responsibility of the hook register to determine if the wiring is not consistent with what they want when the register their hooks. If the wiring is incorrect then a refresh bundles operation must be performed to re-resolve the bundles with the hooks present.
This kind of thing is required regardless of the cached results since OSGi decided to build resolver hooks on the service layer on top of the module layer. In Equinox I imagine a resolver hook implementation would want to store the resolution timestamp on shutdown and do a check that the resolution timestamp has not changed when they register their hooks (i.e. check the results from org.eclipse.osgi.service.resolver.PlatformAdmin.getState(false).getTimeStamp()). If the timestamp has changed since the hook was unregistered then a refresh is needed. Also see https://bugs.eclipse.org/bugs/show_bug.cgi?id=343020 for a related discussion for the region digraph implementation in Equinox.
Tim Diekmann ---06/07/2011 04:35:00 PM---Hi,
Tim Diekmann <tdiekman@xxxxxxxxx>
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
06/07/2011 04:35 PM
[equinox-dev] ResolverHook on startup