I have a DS-service consumer of the IFoo interface:
@Component
public class IFooListener {
@Reference(bind = "bind",
unbind = "unbind",
referenceInterface = IFoo.class,
cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE,
policy = ReferencePolicy.DYNAMIC)
public static final Map<String, IFoo> allServices = new ConcurrentHashMap<>();
protected void bind(IFoo service, Map<String, String> properties) {
....
}
....
}
I have the IFoo service registered like that:
BundleContext ctx = FrameworkUtil.getBundle(IFooListener.class).getBundleContext();
Properties properties = new Properties();
....
ServiceRegistration managementSrv = ctx.registerService(IFoo.class.getName(), iFooImpl, properties);
What I would like to know is, is it guaranteed that when the ctx.registerService(...) method returns, all DS consumers that were already available at that time would have been notified that an IFoo service has become registered? Is this osgi-implementation specific thing? Or is this part of the DS specification?