Figure 2.1 The elements of Apache Aries. Aries includes a Blueprint implementation, OSGi integrations
for JPA, JTA, and the web, application packaging, and JMX management. Blueprint is at the heart of a
lot of the Aries function.
We'll focus on Apache Aries and a number of its sibling Apache projects in our exam-
ples in this topic. It's not necessary to use an Apache stack to use enterprise OSG i. You
can replace parts of the stack with other implementations, or you can use an entirely
Eclipse stack, or you can opt for one of the commercial products, such as the Web-
Sphere Application Server.
My first enterprise OSGi runtime
Apache Aries by itself isn't enough to run enterprise applications; there's no web con-
tainer, database implementation, or OSG i framework. But it's fairly straightforward to
add these things to Aries, and the result is a handy little sandbox environment. Aries
has already done this, providing an assembly for the Aries samples, and this runtime
can be reused for your own applications.
Begin by downloading the source zip for the latest release of the Aries samples
from http://aries.apache.org/downloads/currentrelease.html . The samples are listed
at the top of the page, and you want the main samples download, a zip that contains
the source for all the samples. Unzip and navigate down one level in the directory
structure. You'll find the source code and build files for all the Aries samples. Navigate
to blog/blog-assembly. Finally, use Maven to build the assembly:
This build isn't building any samples, just preparing a runtime environment for the
samples to run in. It downloads the binaries for the latest Aries release and all their
dependencies. It also includes Pax Web for running OSG i web applications. When the
build has completed, have a look in the target directory. You should see lots of Aries
JAR s, and also a few Derby, Open JPA , and Geronimo JAR s. Perhaps most importantly,
there's a single JAR containing an OSG i container. See figure 2.2.
Search WWH ::