Apache Felix and sub-projects

Apache Felix is an open-source community effort to implement the OSGi Service Platform Release 4 Core specification under the Apache license.

Started as an initial codebase donation from the Oscar project (on ObjectWeb), it graduated from incubation and became a top-level project in 2007. The result is a performant and small footprint piece of software.

In addition to the framework implementation sub-project, the Felix project provides many services specified in the OSGi Service Compendium specification such as:

  • Log Service specification implementation (section 101) for message logging by bundles in the context of the framework. We will work with the Log service implementation in Chapter 10,Improving the Logging
  • Http Service specification implementation (section 102) for providing an http interface to bundles and allowing them to interact with users on a network using standard technologies such as XML or HTML. We will work with the Felix Http Service implementation in Chapter 11.
  • Configuration Admin Service specification implementation (section 104), which is used to manage a bundle's configuration data.
  • Metatype service implementation (section 105), which allows us to describe attribute types that bundle services can use as arguments in a machine-readable format.
  • Preferences service implementation (section 106), which can be used by bundles to store settings and preferences such as user profiles or application data.
  • Service Component Runtime, which is an implementation of the OSGi Declarative Services specification (section 112) providing a service-oriented component model to simplify OSGi-based development, as well as the runtime activities of service registration and handling of dependencies.
  • Event Admin Service specification implementation (section 113), which facilitates the exchange of events as a means of communication between bundles using a publish and subscribe model.
  • UPnP Device service implementation (section 111), which helps the integration of UPnP devices on a peer-to-peer network using XML over HTTP.

Note

UPnP™ is a trademark of the UPnP Implementers Corporation.

In addition to these services, the Felix project provides useful services that improve the developer's experience as well as simplify the framework administration tasks like:

  • Dependency Manager, which uses a declarative approach to simplify dependency management.
  • File Install, which is a service that provides a simple, directory-based, bundle deployment management.
  • Gogo, which is an advanced shell for interacting with the OSGi frameworks (implementation of OSGi RFC 147). We will introduce Gogo in Chapter 3, and learn how to create new commands that hook into it in Chapter 8.
  • iPOJO, which (provides) a sophisticated service-oriented component (environment that simplifies) the development of OSGi bundles by assisting with property injection and service registration. We will work with iPOJO in Chapter 9.
  • Maven Bundle Plugin, which improves the bundle developer's experience by providing automation in the process of bundle creation, thus reducing the error-prone manual intervention. We will work with the Maven Bundle Plugin throughout our case study in Chapter 5.
  • Maven SCR Plugin, which assists the developer's use of declarative services by automating the creation of metatype descriptors.
  • OSGi Bundle Repository Service, which simplifies the framework administrator's task by enabling the connection to remote bundle repositories, the listing of deployed bundles and their installation onto the framework, also handling the deployment of their dependencies. We will learn more about the OSGi Bundle Repository Service and start using it in Chapter 6.
  • Shell Service, Remote Shell Service, and Shell TUI provide means to interact with bundles on the framework, locally and remotely, using a simple command-line console.
  • Web Console Service provides an extensible, browser-based, graphical administration console to the framework. We will look closely at the Web Console in Chapter 12.

Those services, combined with the wide variety of bundles made available by other parties, constitute a rich selection for the construction of an enterprise application.

Pop Quiz

Let's quickly check what you've learned so far:

  1. Which of the following best describes an OSGi bundle?

    a. It is an XML file, with headers and properties that describe the bundle

    b. It is a service that is registered using the Service layer components

    c. It is a Java archive, containing additional headers in its manifest file

  2. How would you register an OSGi bundle with the framework?

    a. I implement registration code in the main() method

    b. I provide properties in the bundle manifest

    c. It is detected automatically by the framework

  3. What happens if, the active start level being at 4, you set it to 3?

    a. All the bundles in level 3 are started

    b. All the bundles in level 4 are stopped

    c. All the bundles are stopped and those on level 3 are started.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.51.153