Hi all,

Apache Sling is a web development framework implemented in OSGi bundles
which makes heavy use of Declarative Services. By default we use the
Apache Felix Declarative Services implementation. But lately I tried to
use the Equinox Declarative Services implementation and encountered the
following discrepancy with respect to Component Factories:


Equinox
-------
If a component is declared as a component factory by way of the factory
attribute, the component _must_ be declared as a delayed component by
setting the immediate attribute to false.

This factually prevents using component factory components without
service elements because components without a service element _must_ set
the immediate attribute to true.

For Apache Sling, this is a problem, because one of our Component
Factory components in fact does _not_ have a service element and thus is
not usable with Equinox Declarative Services.


Apache Felix
------------
If a component is declared as a component factory by way of the factory
attribute, the component _must_ be declared as a delayed component by
setting the immediate attribute to true.

This is consistent with the requirement of the immediate attribute with
respect to the service element: If the service element does _not_ exist,
the attribute _must_ be true, which is also enforced when having the
factory attribute set. If the service elements exist, the immediate
attribute may be true or false, hence the required value of true is
valid.


Knopflerfish
------------

Knpflerfish Declarative Services does not seem to enforce a specific
value of the immediate attribute in conjunction with the factory
attribute.


My question is: Is there in fact a requirement to coordinate the
immediate attribute and the factory attribute ? I could not find any
concrete hints in the specification.

My interest in this is two-fold: (1) I want to run my project with
Equinox Declarative Services and (2) I want the Apache Felix Declarative
Services implementation to be correct.

Thanks for any thoughts on this.

Regards
Felix

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to