Community
Participate
Working Groups
The Equinox implementation of DS has gone dormant now for several releases. It is implementing an old DS specification (from OSGi R5 I think). Without a significant contribution from a new contributor or an existing Equinox committer the Equinox DS implementation will remain at its current specification level and will continue to show signs of age. I suggest we investigate replacing the Equinox implementation with the Felix one. I know of several products that use Equinox framework with Felix SCR implementation. It is very stable and in many cases performs better than the Equinox DS implementation.
Just as a small hint. I'm sure you are aware of it, but I wanted to mention it as I came across it lately. Some of the DS related interfaces in package org.osgi.service.component are located in the bundle org.eclipse.osgi.services. But in Felix they are located in the SCR bundle. If developers use Require-Bundle org.eclipse.osgi.services (which is the wrong approach of course) they will get a uses-constraint-violation. At least by only taking in the Felix SCR bundle. I recently fixed an issue in Platform UI with regards to that. I personally think the interfaces should be removed from org.eclipse.osgi.services. But of course that depends on the way it is planned to make use of Felix SCR in Equinox. I just wanted to mention that this could cause issues on the way.
(In reply to Dirk Fauth from comment #1) I will be removing the classes from org.eclipse.osgi.services. That bundle is really bad, wish we never put all these packages in one bundle in the first place. But to remain backwards compatible I am going to have org.eclipse.osgi.services import the component package AND export the component package with mandatory directive (mandatory:="do-not-import-from-me") but I will not specify the value for the do-not-import-from-me attribute. This little trick allows require-bundle wires to org.eclipse.osgi.services to get forwarded to the package exported by the provider of the component package which org.eclipse.osgi.services is wired to. This also prevents any Import-Package wires getting inadvertently wire to the org.eclipse.osgi.services bundle.
@Thomas I just stepped on an issue with Felix SCR 2.0.6. There a dependency to cm is introduced. Surely an issue with Felix SCR as it should be an optional dependency and with 2.0.2 this is correct. But with 2.0.6 that dependency isn't optional. Just in case you come around a related issue when working on this topic.
(In reply to Dirk Fauth from comment #3) > @Thomas > I just stepped on an issue with Felix SCR 2.0.6. There a dependency to cm is > introduced. Surely an issue with Felix SCR as it should be an optional > dependency and with 2.0.2 this is correct. But with 2.0.6 that dependency > isn't optional. > > Just in case you come around a related issue when working on this topic. Are you referring to package imports or the dependency on a CM service being registered. Equinox DS implementation currently has a non-optional Import-Package of the osgi cm package.
(In reply to Thomas Watson from comment #4) > Are you referring to package imports or the dependency on a CM service being > registered. Equinox DS implementation currently has a non-optional > Import-Package of the osgi cm package. Good question. What I can tell so far is that I am able to have a runtime that only contains Felix SCR (2.0.2) and no CM and it runs fine. Exchanging 2.0.2 with 2.0.6 a NoClassDefFoundError occurs. https://groups.google.com/forum/#!topic/bndtools-users/U6nOsvmo67o But probably Equinox DS doesn't run into that because of the org.eclipse.equinox.osgi.services bundle that contains all the interfaces.
New Gerrit change created: https://git.eclipse.org/r/88414
Gerrit change https://git.eclipse.org/r/88414 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=c49e1155e09e7d358470d592f366eadf3598fe43
New Gerrit change created: https://git.eclipse.org/r/88419
Gerrit change https://git.eclipse.org/r/88419 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=86ac868ae86d1ff21292919d47a6dbf46075d3a8
New Gerrit change created: https://git.eclipse.org/r/88883
New Gerrit change created: https://git.eclipse.org/r/88887
Gerrit change https://git.eclipse.org/r/88887 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=4599e494de18388f9c7c079077b15de7e8240303
Gerrit change https://git.eclipse.org/r/88883 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=50fbb0b7882490a66056c11a9c2bc4d32ce2dfa8
New Gerrit change created: https://git.eclipse.org/r/88911
One thing to note on performance. I did detect a slowdown for startup when using the felix SCR. I attributed this to two defects in felix SCR for which I have provided fixes to in felix: https://issues.apache.org/jira/browse/FELIX-5474 https://issues.apache.org/jira/browse/FELIX-5360 Both of these are now fixed and released as part of felix SCR 2.0.8 release. I have a CQ open to update to this version for Oxygen.
Gerrit change https://git.eclipse.org/r/88911 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=19cf1c68d5c5862b4f9681f3645de747779a3696
I have released everything to start using felix SCR implementation for DS. Marking as fixed. I'll open a follow on bug to update to felix scr 2.0.8.
(In reply to Thomas Watson from comment #17) > I have released everything to start using felix SCR implementation for DS. > Marking as fixed. I'll open a follow on bug to update to felix scr 2.0.8. See bug 510635.
I downloaded the latest Oxygen Integration Build I20170118-2000 and tried to create a new E4 RCP application. The application does not start and contains several errors: 1. org.apache.felix.scr is missing the the product definition created by the wizard. This is surely a PDE issue and need to be fixed in the wizard there. But that also shows that we can expect regressions for products that are plugin-based. So we need to at least mention this in the N&N 2. Felix SCR requires CM This seems to be an issue with Felix SCR 2.0.6 [1]. While org.osgi.service.cm is configured as an optional dependency, it seems to be required. Maybe they are able to fix it with 2.0.8 as you plan to upgrade to it because of your performance fixes. The following exception can be seen on startup after adding org.apache.felix.scr to the product definition: Caused by: java.lang.ClassNotFoundException: org.osgi.service.cm.ConfigurationListener cannot be found by org.apache.felix.scr_2.0.6.v20161206-1638 3. There are several issues regarding unresolved requirements. Probably they are a follow up on this: !ENTRY org.eclipse.osgi.services 2 0 2017-01-19 09:36:41.055 !MESSAGE Could not resolve module: org.eclipse.osgi.services [5] Unresolved requirement: Import-Package: javax.servlet; resolution:="optional" Unresolved requirement: Import-Package: javax.servlet.http; resolution:="optional" Unresolved requirement: Import-Package: org.osgi.util.function; version="[1.0.0,2.0.0)" while javax.servlet is optional, it looks like org.osgi.util.function can not be resolved. And as org.osgi.service.component.annotations and org.osgi.service.event are provided by org.eclipse.osgi.services, a lot of bundles are not able to resolve. Is some additional bundle missing that contains org.osgi.util.function? Or are we in a intermediate state in the Equinox development where this package is added? IIRC this package contains some functional style code, but I haven't worked with that yet, so I can't say for sure. [1] https://groups.google.com/forum/#!topic/bndtools-users/U6nOsvmo67o
I added org.eclipse.osgi.util to the product definition and this seems to solve the dependency issues. But I wonder why org.eclipse.osgi.util has at the same time an Export-Package: org.osgi.util.function;version="1.0" aswell as an Import-Package: org.osgi.util.function; version="[1.0, 1.1)" Is this intended? Nevertheless it seems the issues can be solved by adding the following bundles to the product definition: org.apache.felix.scr org.eclipse.osgi.util And because of the dependency to org.eclipse.osgi.util, also the e4.rcp feature needs to be extended to include that bundle.
The missing bundle in the e4.rcp feature is resolved via Bug 510406 The reported dependency issues in Comment 19 can be resolved by adding the missing bundles to the product configuration. I created Bug 510676 to modify the PDE wizards to include the missing bundles.
This should be added to the N&N M5 to make users aware of the change.
(In reply to Lars Vogel from comment #22) > This should be added to the N&N M5 to make users aware of the change. I'll get the item added to N&N.
New Gerrit change created: https://git.eclipse.org/r/89113
Gerrit change https://git.eclipse.org/r/89113 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=a6af99e655422bacedc4d35de56a20ac80145cd8
Bug 510673 has been fixed in master, so that clients using org.eclipse.equinox.ds get this property setting for free: ds.delayed.keepInstances=true The removal of the 3 interfaces Component, Reference, ScrService in package org.apache.felix.scr was a breaking API change, but this can be discussed in bug 510679.