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




|------------>
| From:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Tim Diekmann <[email protected]>                                            
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Equinox development mailing list <[email protected]>                   
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |06/07/2011 04:35 PM                                                          
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[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
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev


<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to