Chapter 2. Understanding OSGi technology
This chapter covers
- Describing concepts involved in OSGi
- Describing how to use the key parts of OSGi
- Providing all OSGi skills to be able use Spring DM
Perhaps you’re wondering how a dedicated chapter on OSGi technology is appropriate to a Spring DM book? As we saw in chapter 1, Spring DM enables the use of the Spring Framework within an OSGi environment. Spring is really popular at the moment, and many Java developers know of its features: dependency injection, AOP, and its approach to structuring Java applications and simplifying development of enterprise Java applications. In contrast, the term “OSGi” is reasonably well known, but its features are much less so. Most developers and architects probably know that the technology addresses the modularity of applications but little else.
We’re strongly convinced that some OSGi features need to be understood in detail before you can understand and fully utilize Spring DM correctly. As this book is about Spring DM, we’ll focus our discussion of the OSGi technology to the context of the framework and emphasize the most important aspects to make learning it easier.
Let’s now look at the OSGi technology and how you can take advantage of it within your Java applications. Because we provided a high-level description of OSGi’s features in chapter 1, we won’t describe those key concepts again. We’ll go ahead and show, in more detail, how the technology works and how to use its features.