Chapter 11. Migration and integration

 

This chapter covers

  • How to access non-OSGi code from within an OSGi framework
  • How to migrate Java EE web applications into OSGi
  • How Apache Aries can be used to run EJB modules

In this book, we’ve been looking at how to write OSGi applications from scratch. This is fun, and also useful to know how to do, but it isn’t usually the case that you can begin a brand new project with no existing code. Normally, you’ll have application code to bring with you, either code that needs to be migrated into OSGi as part of your project, or external services that you need to be able to use from within the OSGi framework. Having to bring these sorts of things with you often results in a sinking feeling, particularly if the code has to keep working in more than one environment.

We’re happy to tell you that migrating to OSGi is almost certainly not as hard as you think, and that there are a number of helpful OSGi tools and specifications that make these sorts of requirements possible.

When writing any enterprise application that’s going to be put into production, one of the main tasks is usually to integrate with an existing system or service. It’s unlikely that this service is OSGi-based, and there’s a decent chance that it isn’t even using Java. Regardless of how the backend service is implemented, there are techniques you can use.

11.1. Managing heterogeneous applications

11.2. Migrating from Java EE

11.3. Summary