Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Catching up with Apache Felix OSGi Container

Catching up with Apache Felix OSGi Container

This item in japanese

Felix is the Apache implementation of OSGi Release 4 specification. OSGi is a specification of a Java based service platform targeted for use by systems that require long running times, dynamic updates, and minimal disruptions to the running environment. A number of companies have been using OSGi to create micro-kernal & plugin architectures to enable good modularizatoin and dynamic assembly at run time, including Eclipse IDE, which was the first major project to adopt OSGi technology. Several other projects such as Apache Directory, Geronimo, Jackrabbit, Spring, and JOnAS are also moving towards the same adoption.

Richard Hall, one of the project committers, did a presentation on Apache Felix project at ApacheCon last month. He started off the presentation with an overview of OSGi Architecture and its Framework Layering. He said that any application, whether it's an Embedded system, Client or Server application, can get the benefits of modularity and extensibility from using OSGi in its implementation. In the presentation, Richard also demonstrated the use of Felix components with a sample Swing based paint program.

InfoQ spoke with Richard about the goals of Felix project, its current status, and how the framework fits into other Apache projects, especially those in the SOA stack since Felix also aims for providing a service-oriented component model.

Richard said Felix project is the result of a volunteer community effort. The goal of the project is to make it easy to embed the framework into other projects. He said the current released version 1.0.1 is mostly compliant with OSGi R4 spec and it has been tested against the OSGi Test Compatibility Kit (TCK). The results of TCK test suite are posted on Felix website. The main missing piece for R4 compliance is the support for bundle fragments which will be worked in the next release. Fragments are the bundles that are attached to the main application bundle. A good example of fragments is the translation files for different locales. Felix version 1.0.2 is expected to be released shortly.

Responding to a question on how Felix fits into Apache SOA projects such as ServiceMix and CXF, he said that there is interest in OSGi technology in both ServiceMix and CXF communities and OSGi platform provides a good environment for deploying and managing services implemented with such technologies.

What role can Felix play in enterprise SOA initiatives where dependency and version management and governance play a vital role in achieving the SOA benefits?

At a minimum, it provides them with a platform into which they can package, deploy, and execute applications in a modular fashion to help them with dependency and version management. Effectively, OSGi technology is the missing modularity layer for the Java platform. Additionally, the OSGi platform also provides a service-oriented application model, which allows OSGi-based applications to be built from service-oriented principles in addition to being modular.

Europa, the latest version of Eclipse is bundled as an OSGi module. Are there any plans to bundle the Apache products (Tomcat for example) as OSGi modules as well?

Eclipse uses OSGi as its modularity mechanism for plugins. Our goal at Felix is to get other Apache projects packaging their artifacts as OSGi bundles. Within Felix we have started to create bundle wrapper JAR files for various common open source packages to help start the process. In many cases it is as simple as adding some metadata to the existing JAR file's manifest, but in other cases it requires more effort to integrate an existing project with OSGi technology. We are also working with the Maven community to try to get some level of OSGi metadata added to every JAR file that Maven creates, which would be a good start.

The next major release of Felix will be version 1.2 which will have support for bundle fragments. With fragment support, Richard said that Felix should basically be R4 compliant, which will make it easier to focus on R4.1 compliance.

Felix graduated into a top level Apache project earlier this year; the project team released version 1.0.1 back in October. A Maven plugin for Service Component Runtime (SCR) descriptors was released last month. This plugin can be used for generating OSGi service descriptors based on annotations. Felix also has Eclipse integration support so the developers can run Felix inside the Eclipse IDE. Felix components are licensed under the terms of Apache Software License Version 2.0.

See also numerous OSGi related news and videos at

Rate this Article