Chapter 12. Advanced component frameworks

 

This chapter covers

  • Exploring the OSGi Blueprint component framework
  • Exploring the Apache Felix iPOJO component framework
  • Using Declarative Services, Blueprint, and iPOJO in a single application

In the last chapter, we introduced you to component-oriented programming and how it relates to OSGi. We also introduced a lightweight component framework defined by the OSGi Alliance, called Declarative Services, which you used to recreate your paint program. Declarative Services is just one possible component framework for OSGi. In this chapter, we’ll introduce you to two more: Blueprint and iPOJO. These component frameworks provide more advanced capabilities than Declarative Services.

The numerous component frameworks for OSGi may at first seem daunting, but the good news is that you aren’t necessarily constrained to a single decision for all time. Choose whichever one seems best to you now. We’ll show at the end of this chapter that it’s possible to have different component frameworks collaborate in a single application.

Let’s get started with the Blueprint component framework.

12.1. Blueprint Container

12.2. Apache Felix iPOJO

12.3. Mix and match

12.4. Summary