Homemade DS component framework - optional lab assignment

Resources

Assignment description

Goal: Understanding how the Service Component Runtime (SCR) of OSGi's Declarative Services (DS) is made, by implementing an own simplified version. Mastering the use of OSGi.

Credits: by doing correctly this assignment you can obtain a maximum of 12 lab points

Deadline: Week 14

Requirements:

Component frameworks in OSGi act as dependency injection frameworks and are generally implemented as other bundles using the extender pattern. They listen for bundles containing components to come and go so they can start managing the contained components.

A bundle is recognized to be containg components that belong to the framework by certain additional headers in the bundle manifest file. Also some additional metadata which describes the components contained in the bundle must be present (usually in a distinct file).

In your simplified component model, a component may provide a set of services and may require a set of services. Each required service is of cardinality "1..1" (mandatory and simple). The requirements are solved by a static policy.

If the components required services are satisfied, the component framework can instantiate the component and publish its provided services into the service registry.

Develop two different component-based applications over your component framework. Demonstrate the deployment of the applications and the functioning of your component framework in an OSGi container.