Alexander Shutyaev wrote:
Stoyan Boshev wrote:
Hi Alex,

Could you please clarify what goes wrong in your project when using Equinox DS compared to Felix DS?
Also I need to know the version of Equinox DS you are using.

Thanks,
Stoyan



Alexander Shutyaev wrote:
> Hello again!
>
> I'm very sorry that I actually flooded you with messages, but you know,
> the development process goes very strange sometimes ;) You know it's a
> pity that e-mail messages once sent can not be canceled. =)
>
> I solved my problem and guess what... found another one. You once wrote
> in org.apache.felix.dev I quote:
>
> "your component does not have to care about getting the configuration
> from the Configuration Admin. It is provided by the Declarative Services
> implementation in the ComponentContext given to the activate method"
>
> That was what I actually wanted and that is how Apache Felix behaves. I
> however use Equinox and when I switched the SCR (or DS) package back to
> equinox it just stopped working the way it did (and the way I want). I
> inspected the source code of Felix and Equinox and found out one big
> difference: Felix registers some of it's classes as a
> ManagedServiceFactory (thus catching my configurations from
> ConfigurationAdmin) while Equinox does not.
>
> As this was your work I guess you'll say something like "Don't use that
> baaad Equinox, use our good Felix" =) That's not quite alright with me
> but still I'm using scr bundle from Felix.
> The question is who is right in this case: Felix or Equinox? I'm not an
> English native speaker, so it's very hard for me to argue about
> specifications aspects and so I ask you as a man who studied this
> problem. Maybe the specification itself isn't clear enough?
>
> So anyway there's a bug somewhere: either Felix, or Equinox or the OSGi
> specification. I think we should find out where and post some kind of
> bug report.
>
> Thanks for cooperation ;)
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev


OK, here is the difference, as short as I can describe it:

1. Felix implementation of ComponentFactory provides also a ManagedServiceFactory interface and self-registers as a ManagedServiceFactory (thus recieving Configuration objects from ConfigurationAdmin) http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ComponentFactoryImpl.java?view=markup

2. Equinox implementation does no such thing (I haven't found any occurence of "ManagedServiceFactory" in related files) http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentFactoryImpl.java?root=RT_Project&view=markup

What I need is the behavior #1. What I want to know is which behavior is "right" according to the specification. If Felix is right, then I think we should post a bug to Equinox. If not - post a bug to OSGi Specification asking to clarify this matter (or add the description of Felix's behavior - 'cause I think it is completely logical)

Equinox and Felix DS implementations are both correct. They just do one thing in different ways. Equinox DS implementation is using a ConfigurationListener to listen for configuration changes. Since there is no difference in the functional behavior I think this is not a bug either in the OSGi specification or in any of the DS implementations. Originally I thought you have had functional problems with Equinox DS, that's why I asked for more details. Did you actually experience any functional problems with Equinox DS? I am referring to your explanation: "I however use Equinox and when I switched the SCR (or DS) package back to equinox it just stopped working the way it did (and the way I want)"

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

Reply via email to