shared: This bundle exports the service interface for the proposed ComplexService. http.handler: This bundle creates a HTTP handler that takes in an incoming request, finds the appropriate ComplexService, invokes it and returns the response. The bundle depends on the the service interface exported in the shared bundle. complexapp: This bundle registers an implementation of the ComplexService with OSGi.
You also need external bundles that may be downloaded: (Look at OSGi HTTP Server) javax:servlet:2.4 – Download from Eclipse Orbit – This provides the Java Servlets necessary to handle HTTP org.eclipse.osgi:services:3.1.x – Download from Eclipse Equinox org.eclipse.osgi:http:1.0.x – Download from Eclipse Equinox – These two provide the HTTP Server services
I will be using the Maven plugin (Felix plugin based on BND) to create the bundles I am writing. For example the POM file for shared is defined as (look at source for all):