Chapter 4. Using Spring DM extenders

 

This chapter covers

  • The standard Spring DM and web extender mechanisms
  • The lifecycle of Spring application contexts in Spring-powered bundles
  • How to structure and configure Spring-powered bundles

Spring DM brings new powers to your OSGi bundles; namely, all the power available in the Spring Framework, which means a great deal! We saw in the previous chapter how Spring DM can automatically create an application context on behalf of a bundle, assuming this bundle contains Spring configuration files in a specific location. With the availability of the Spring lightweight container, a bundle can build and wire all of its constituent components and let Spring DM interact with the OSGi platform to register Spring beans in the service registry. All this can be driven declaratively, without any of your Java code depending on the OSGi APIs.

4.1. Unleashing Spring DM’s standard extender

4.2. Unleashing Spring DM’s web extender

4.3. Summary