Chapter 6. Moving toward bundles

 

This chapter covers
  • Choosing a bundle identity for a JAR file
  • Determining which packages a bundle should export and/or import
  • Migrating an application to OSGi
  • Dividing an application into a set of bundles

 

The first part of this book introduced the three layers of OSGi: module, lifecycle, and service. We’ll now take a more practical look at how you can migrate existing code to OSGi by using one or more of these layers, beginning with examples of turning real-world JAR files into bundles. After that, we’ll examine different ways of migrating a complete application to OSGi and finish up with a short discussion of situations where you might decide not to bundle.

By the end of this chapter, you’ll know how ...

Get OSGi in Action: Creating Modular Applications in Java now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.