Java Reference
In-Depth Information
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 topic introduced the three layers of OSG i: module, lifecycle,
and service. We'll now take a more practical look at how you can migrate existing
code to OSG i 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 OSG i 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 to take your current application
and all of its third-party libraries and turn them into bundles, step by step. You'll
be able to move existing projects to OSG i, plan new projects with OSG i in mind,
and understand when it may not be the right solution for you. In other words, you
should be able to explain in detail to your manager and co-workers how OSG i will
affect your project. But before we reach that stage, we first need to consider a
simple question that often comes up on the OSG i mailing lists: how can you turn
your JAR file into a bundle?
191
Search WWH ::




Custom Search