Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In the first chapter of the book, we implemented a simple calculator application. That application was simple enough to demonstrate the basic concepts of unit testing. We take the same approach in this chapter. We implement the calculator application as an OSGi service. We also implement a sample client for that service and a test bundle for the client. Finally, we install the three bundles in the Apache Felix environment.
Apache Felix—open source implementation of the service platformThe OSGi alliance defines a number of specifications for the OSGi service platform. The implementation of these specifications can be done by anyone. In this chapter, we use the Apache Software Foundation implementation Apache Felix (http://felix.apache.org/). The installation of the Felix project is easy. Start by downloading the latest distribution. Extract the archive and create an environment variable called FELIX_HOME pointing to the Felix folder. The Felix folder should contain the following:
|