+

Search Tips   |   Advanced Search

Composing advanced features using OSGi Declarative Services

Simple features can be controlled using bundle activator classes and direct implementation of interfaces such as ManagedService and ServiceTracker. As relationships between bundles become more complex, it can be better to use facilities such as OSGi Declarative Services (DS) to decompose a feature into individual services. DS (sometimes known as the Service Component Runtime, or SCR) provides lifecycle and injection management of OSGi services.

Organize the feature logic as a set of declarative services has a number of advantages:

Detailed information about use of OSGi Declarative Services is available from a number of online resources, including the OSGi Community Wiki.

This task provides simple descriptions of how to declare the services to DS, how to obtain references to other services, and how to manage configuration properties for each service.


Subtopics


Parent topic: Develop a Liberty feature