Chapter 13. Putting it all together by extending Blueprint

 

This chapter covers

  • Bundle flavors
  • The Blueprint service
  • Extending Blueprint with new features
  • The Blueprint Namespace Handler service
  • The Blueprint Interceptor service

So far you’ve learned about and used several independent OSGi services, such as the Configuration Admin in chapter 5, the Event Admin in chapter 6, JPA in chapter 7, JTA in chapter 8, JNDI in chapter 9, remote services in chapter 10, Start-Levels in chapter 11, and finally JMX in chapter 12. The common pattern for using these services is to retrieve them from the OSGi service registry. This is done programmatically and generally leads to a lot of boilerplate code and decreases user productivity. Can we do better?

Fortunately, OSGi defines a declarative language for assembling applications together, applications that can use all sorts of different OSGi services. For example, as you’ll see at the end of this chapter, we’ll change the auction application developed in chapter 3 to use the Configuration Admin, the Event Admin, and JPA services. This is done using OSGi’s Blueprint service, by specifying an XML document that puts it all together.

13.1. Application bundles and their containers

13.2. Declarative assembly using Blueprint

13.3. Extending Blueprint

13.4. Revisiting the auction application

13.5. Summary

13.6. Epilogue