# OSGi module

We can see an increased demand for OSGi technology these days. Developers and users especially like the OSGi kind of Classloader wiring. Being able to have a Class dependency defined as a versioned package dependency is something we've been lacking for while now. There are new JSRs in the making, that will eventually solve this problem, but OSGi is here and now.

Looking at the OSGi framework we saw a lot similarity with what we already have with the Microcontainer. Another aspect of OSGi that is a cruical part of the core Framework is the Service Registry. A simple lookup pattern that takes Classloading wiring into consideration when doing Service lookup. While we already have contextual awareness in tje Microcontainer, implementing this was a matter of a simple `OSGi Facade` over the existing Microcontainer registry. Together with new classloader there is a fully OSGi r4.1 compatible solution available with the 2.0.0 Microcontainer.

OSGi usage in Microcontainer falls down to three different aspects:

- new OSGi Classloader
- declarative or programmatic OSGi services deployment
- OBR (OSGi Bundle Repository) usage

The new OSGi Classloader is used as a default Classloader, it is backward compatible with the existing UCL.

For the existing OSGi declarative services or programmatic usage via BundleActivator, there is a full support of the OSGi core API. But for new service declaration, we encourage people to use the much richer Microcontainer IoC features. The Classloading behavior and Service Registry will take new Microcontainer services into consideration.

OBR usage ...