OSGi from the Trenches: Painless Server Side Development


Selecting the right toolchain that “just works” for a new OSGi based effort is still a difficult task. Many developers struggle and perceive OSGi to be overly complex and too painful. We would like to share our experience using a holistic approach to OSGi server side development based on plain Equinox that covers IDE, dependency management, build and integration testing.

This approach differs from others in that it focuses on getting the average developer on board quickly and involves writing some small (core) parts of the toolchain yourself to put you in the driver’s seat. The only preconditions for this approach are Maven and an m2e plugin for Eclipse to execute Bnd on each incremental build. Our approach is particularly valuable in product-line or platform development.

Using essential code snippets and brief live demos we will demonstrate:
• How to develop your own OSGi launcher
• How to use the launcher during development (IDE + Maven) and deployment
• How to use the launcher for JUnit based integration tests
• How to single source dependency management from the pom.xml: no target platforms, no config.inis, and no manual editing of MANIFEST.MF files (let Bnd do its job)

In the second part, we will show you how to tackle bad OSGi metadata at runtime using a simple Java DSL. We will specifically address a live patching mechanism of MANIFEST.MF files based on Equinox hooks that allows third-party .jar files to remain unchanged. This has many advantages both from a licensing and from a maintainability perspective.

Session details
Schedule info
Session Time Slot(s):
Wednesday, November 4, 2015 - 15:15 to 15:50