[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] ResolverHook on startup

Thanks Tom for the confirmation.

      Tim.

On Jun 8, 2011, at 6:25 AM, Thomas Watson wrote:

Hi Tim,

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.

Tom



<graycol.gif>Tim Diekmann ---06/07/2011 04:35:00 PM---Hi,

<ecblank.gif>
From:
<ecblank.gif>
Tim Diekmann <tdiekman@xxxxxxxxx>
<ecblank.gif>
To:
<ecblank.gif>
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
<ecblank.gif>
Date:
<ecblank.gif>
06/07/2011 04:35 PM
<ecblank.gif>
Subject:
<ecblank.gif>
[equinox-dev] ResolverHook on startup





Hi,

I have a Equinox implementation specific question regarding persistent wiring and ResolverHooks.

When Equinox reifies the bundle wiring upon startup, does it call the ResolverHookFactoryService implementations? I would assume the hooks would need to be installed from the 'outside' or else the factories would not be registered by the time the framework rebuilds/reifies the bundle wiring state.

My current assumption is that ResolverHooks are not called on startup of Equinox for persistent wiring.

Can someone confirm?

Thanks,

     Tim.

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev