0

I am working on an embedded system that previously used Apache Felix as an OSGi framework. I've been tasked with removing Felix and replacing it with Equinox, because Equinox currently supports a more recent version of the OSGi specification.
The software on the device has a sizeable amount of proprietary code that ties in directly with certain bundles that are usually shipped with Felix (things like the eventadmin and log bundle). The Equinox versions of these bundles are different enough that it would be a lot of work to re-write the code.

Is there any reason to not keep using some of these Felix bundles, even after switching the underlying framework from Felix to Equinox?

I want to clarify that I am still trying to wrap my head around what exactly OSGi does. What I'm concerned about is that by not using the Equinox bundles, we'll lose the advantage of switching to Equinox (I'm concerned that all the extra code that provides the newest specification comes from the bundles, and that the applications which are designed specifically for Equinox will expect these bundles to be used.).

Woodrow Barlow
  • 8,477
  • 3
  • 48
  • 86
  • I want to clarify that I am still trying to wrap my head around what exactly OSGi _does_. What I'm concerned about is that by not using the Equinox bundles, we'll lose the advantage of switching to Equinox (I'm concerned that all the extra code that provides the newest specification comes from the bundles, and that the applications which are designed specifically for Equinox will expect these bundles to be used.). – Woodrow Barlow Sep 02 '14 at 12:25
  • I suggest you to add this comment as part of your question – Leo Sep 02 '14 at 12:29

1 Answers1

4

The Apache Felix framework implements the OSGi core specification and not more. Equinox also implements the OSGi core specification.

You are asking if the sub-projects of Apache Felix (EventAdmin, SCR, ...) could be used inside Equinox. The answer is YES. You can use many of the sub-projects (if not all) inside Equinox as they rely only on the core specification.

It might be confusing that they are called "Felix ...". They could be called anything else as they have nothing to do with the container implementation, only with the specification that both Felix and Equinox implement.

Btw.: Some of the sub-projects implement chapters from OSGi Compendium Specification. If others implement the same chapters exactly, they should be switchable without a problem.

Balazs Zsoldos
  • 6,036
  • 2
  • 23
  • 31
  • Thank you for the answer. If a certain OSGi application was built for Equinox but has known problems working on Felix (I know this _shouldn't_ happen, but that seems to be what we're facing), would this likely come from a difference in the implementation of the various sub-projects (for example, a difference between `org.apache.felix.http.jetty` and `org.eclipse.equinox.http.jetty`), or something in the core framework? – Woodrow Barlow Sep 02 '14 at 13:32
  • Apache Felix implements only OSGi core. Sadly, Equinox core has some additional features that can be used. If you write something that works on Felix, it will work on Equinox as well. If you write something for Equinox and you use Equinox specific features, it might not work on Felix. I suggest that you should use felix based stuff as much as you can and use only Equinox related projects if necessary. Equinox already supports OSGi 6.0.0 so I guess you are forced to use Equinox OSGi container. Until you use only org.osgi.* packages in your code from the container, you will not have problems. – Balazs Zsoldos Sep 02 '14 at 13:42
  • Thank you. This has helped my understanding a lot. – Woodrow Barlow Sep 02 '14 at 13:43
  • For the record, all artifacts released by the Apache Felix project have to have that in their name. Balazs is right though, there is nothing that ties these bundles to any specific framework implementation. – Marcel Offermans Sep 03 '14 at 06:28