Immediate components currently behave a little differently to delayed 
components and I think this is wrong.

If a required dependency cannot be obtained from a service reference during 
initial activation, currently the immediate component will change state to 
unsatisfied.  However, delayed components where getService encounters the same 
situation will remain registered.

I think immediate components should behave the same as delayed here and remain 
in the registered state.  If the required service shows up later then a call to 
getService will in fact create the object, just like for delayed components.  
If the component state changes to unsatisfied, then the service will be 
unregistered and no one will be able to even try calling getService to find out 
if the required dependency is now available.

If the reason the required dependency could not be obtained from its' service 
reference is that it was being deactivated and unregistered, then a service 
event will be along soon to deactivate the component we are talking about.  
There's no need to guess at the cause of the missing service.

thoughts?

many thanks
david jencks

Reply via email to