ApacheCon Europe 2012

Rhein-Neckar-Arena, Sinsheim, Germany

5–8 November 2012

Felix Connect

Karl Pauls

Audience level:
Intermediate
Track:
Modular Java Applications

Thursday 11 a.m.–11:45 a.m. in Rhein-Neckar

Description

OSGi features the Service Registry and the (µ)service model. The idea of OSGi Connect (RFP-143) is to allow any application built in Java to reap the benefits of service-based modularity. This talk will show you how you can take advantage of µServices to modularize and OSGi'fy existing application and discuss the current status of an Connect implementation at Apache Felix.

Abstract

Many people are drawn into OSGi because it provides class loaders on steroids, however, one of the often overlooked feature of OSGi is the Service Registry and the (µ)service model. µServices provide a much more powerful alternative to the traditional Java factories and listeners in your code or xml, which are the usual culprits for class loading headaches. Alas, you need to migrate your application to OSGi first in order to take advantage of µServices which would make it so much easier to migrate your application to OSGi in the first place.

The idea of OSGi Connect (a.k.a OSGi Lite) is to remedy this situation by providing OSGi without the module layer. PojoSR is an implementation based on Apache Felix and runs in any standard Java environment: from the class path, inside a WAR, wherever your current Java runs because it never touches a class loader. It allows any application built in Java to reap the benefits of service-based modularity without first having to rid existing code of any class loader tricks. This approach also allows, many existing bundles work out of the box - just by adding them to the class path (PojoSR will detect bundles on the class path and execute their activators).

It works so well that OSGi is thinking of standardizing the approach under RFP-145. As PojoSR is already based on Apache Felix, this will be the perfect time to make it a part of the Felix project. This talk will show you how you can take advantage of µServices using PojoSR to modularize and OSGi'fy an existing application and discuss the current status of an Connect implementation in Apache Felix.