OSGI implementation with Apache Karaf

Karaf is lightweight container for OSGI. In karaf, beside OSGI Core, we have other additional feature for support our application, in other words. Karaf is osgi container that ready to used. Not like Felix or Equinox, they are just OSGI core runtime, if you want to used it with integration for example with apache camel or apache cxf, you have to add those feature manually. Here is picture that i take from karaf website


See? 🙂 In karaf, you have console, logging, deployer, provisioning and the others additional feature which work out of the osgi core runtime box. What is the advantage if we are using OSGI in our application development? good question, so many pros and cons if we are using osgi. So far, (I am happy to start from the cons) the problems are so many library outside java world is not osgi-able, so many library divide their component into code and resource, when you working on your code and want to get some kind of resource from other library, it would get you classloader problem. In real case, you will find so many problem that deal with classloading problem. At the beginning you can read this for more information.

Now we will talking about the pros, with osgi, you can stop, restart, uninstall old service without give distraction to another running service. you do not need to compiled all service to make it work, you do not need to restart server environment (jboss? weblogic?) to make it work. just simple, we talk about service. you can save your time, some big application need ten of minutes to compiled. some server environment need a few minutes to run. You could make an application more loosely coupled from the other.

After we know about pros and cons when using osgi, I will start to make a few tutorial using karaf, how do we using karaf, how do we know additional feature, how do we create an application that works in kara. stay tuned….

One thought on “OSGI implementation with Apache Karaf”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.