Search code examples
javaosgiequinoxosgi-bundleknopflerfish

OSGI container identification Equinox / knopflerfish and relation ship between equinox osgi jar and core osgi jar


Question 1:-

I am working on a project which heavily uses OSGI. I am a newbee to OSGI. In my project I see JARS for both equinox and knopflerfish / and or knopflerfish bundles.

Question2:-

How do I determine among Equinox and Knoplerfish, which container does the OSGI use in my project? I assume OSGI can not use both the containers at a time.

Question 3:-

This link mentions Equinox framework requires org.eclipse.osgi_<version>.jar to implement OSGI core. So does this mean it does not require core OSGI jar, osgi.core-6.0.0 from OSGI website.

Does the equinox jar org.eclipse.osgi_<version>.jar behind the scene uses core OSGI jar osgi.core-6.0.0?

Is the equinox jar org.eclipse.osgi_<version>.jar a wrapper for core OSGI jar osgi.core-6.0.0?

Is there any relationship, dependency between the equinox jar org.eclipse.osgi_<version>.jar and the core OSGI jar osgi.core-6.0.0 Or are the two jars independent of each other?

Question4:-

Suppose I am using Equinox container. And I need to update my project to the latest OSGI version. To update the project to latest OSGI jar, which JAR do i replace with the latest jar.

Do I replace core OSGI jar to the latest osgi.core-6.0.0(latest version of OSGI) from [OSGI website] or do I update the equinox jar org.eclipse.osgi_<version>.jar to it's latest version?


Solution

  • osgi.core-6.0.0 is a bundle providing the specification interfaces and classes and is released by the OSGi alliance. org.eclipse.osgi_.jar is the equinox implementation of an OSGi framework.

    In OSGi it is very common that a bundle providing the implementation of an API also embeds the same API. For the equinox framework this is the case. In the jar you will also find all the API interfaces of core too.

    This is mainly done for convenience so people can just start up the jar and do not have to also find the correct API jar and deploy it.

    For an upgrade of the framework you just replace the equinox jar. Typically the equinox jar is not the only one implementing OSGi specs though. You will probably also have an implementation of the config admin service and maybe also other OSGi specs outside core. To also update these you have to replace these jars too. In most cases you can update these separately though as they normally play together nicely.