Hello!

I read the DS spec in OSGi 4.2 Compendium and I probably didn't
understand the following detail about factory components:

112.5.5 says: “The service registration must take place before the
component configuration is activated. Service unregistration must take
place before the component configuration is deactivated.”

That seems to be consistent with 112.2.4: “If the component specifies a
service, then the service is registered after the created component
configuration is satisfied with the component properties. Then the
component configuration is activated.”

But in Figure 112.4 “register” comes after “activate” which is – as far
as I understand – a contradiction of the rules quoted above.

Also in 112.5.5, below figure 112.4, there's this sentence: “This method
[newInstance] must create, satisfy and activate a new component
configuration and register its component instance as a service if the
component description specifies a service.”  Although this does not
define an order explicitly, the order of “activate” and “register” in
this sentence corresponds to figure 112.4.

So my question is:  If a component provides a service and a component
factory is used, what should happen first after a call to newInstance,
activation or registration?

If it is registration, then I don't understand why it is useful to
register a component as a service although it has not been activated.
Isn't there a chance that an uninitialized component instance is used as
a service in this case?  Or is it similar to delayed components, where
the component will be activated as soon as another bundle actually
requests the service?

Regards,
Daniel

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to