A closer look at OSGI

I was reading about OSGI and I found out that it's not as complicated as it looks like. As I am not an Eclipse fan, I tried Knopflerfish and Apache Felix. I might use OSGI in my next projects if they're big enough.

After half an hour, I was able to get a simple bundle running with Apache Felix. I wrote a simple program embedding Apache Felix and created another project which provided a bundle.

My main interest in OSGI is dependencies management handling :

  • Service A is started
  • Service B depends on Service A
    • if service A is not available -> do not start service B
    • if service A is available -> start the service B and register it

Bookmark the permalink. RSS feed for this post.

2 Responses to A closer look at OSGI

clement said...


It can be even simpler by using service component model as SCR (http://felix.apache.org/site/apache-felix-service-component-runtime.html) or iPOJO (http://felix.apache.org/site/apache-felix-ipojo.html).

You don't need to manage the dynamism of services. Service registration and tracking are managed by these frameworks, and then injected inside method (SCR/iPOJO) or fields directly (iPOJO).

Yves Zoundi said...

Thanks Clement, I'll have a look at ipojo

Swedish Greys - a WordPress theme from Nordic Themepark. Converted by LiteThemes.com.