Chapter 6. OSGi and Spring DM for enterprise applications
This chapter covers
- Using the traditional Java EE framework in OSGi environments
- Creating OSGi bundles from existing Java artifacts
- Designing OSGi-based enterprise applications
- Handling OSGi’s dynamic nature
You saw in the previous chapter that OSGi lets its modules communicate only by way of services. This helps decouple them and promotes a more modular programming model than in standard Java. Modularity is good for applications, but, as enterprise application developers, we’ve become negligent when developing enterprise applications in the last few years. These applications grew big and monolithic, did not have particularly strict dependency management, and sometimes used Java introspection or classloaders in fancy ways. Now that we have discovered OSGi and want to build our enterprise applications on top of this wonderful platform, we need to eliminate these bad habits. There is no place for approximation in OSGi.