Chapter 5. Cooperation among Service Bundles

In the traditional library-based software environment, we can always count on the class library to be there. Because library-based software is usually layered, it is impossible to build the next layer if the layer beneath it is not present.

This reassuring static configuration is no longer the norm with the component-based model used by the OSGi framework. We have learned that bundles can be started or stopped and services can be registered or unregistered, which makes for a rather dynamic run-time environment. This chapter provides general guidelines on how to cope with the challenge that during the active life span of your bundle, other bundles and services on which you rely may go away. We propose several solutions and comment on their strengths and weaknesses in various application scenarios. Because framework event dispatching and handling is the central mechanism that enables cooperation of bundles and services, we describe how they work in this chapter as well.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.96.39