Java Reference
In-Depth Information
1.2
An architectural overview of OSGi
The
OSG
i Service Platform is composed of two parts:
the
OSG
i framework and
OSG
i standard services
(depicted in figure 1.3). The framework is the run-
time that implements and provides
OSG
i functional-
ity. The standard services define reusable
API
s for
common tasks, such as Logging and Preferences.
The
OSG
i specifications for the framework and
standard services are managed by the
OSG
i Alliance
backed nonprofit corporation founded in March 1999. The framework specification is
now on its fourth major revision and is stable. Technology based on this specification
is in use in a range of large-scale industry applications, including (but not limited to)
automotive, mobile devices, desktop applications, and more recently enterprise appli-
cation servers.
Standard services
Framework
OSGi Service Platform
Figure 1.3
The OSGi Service Plat-
form specification is divided into
halves, one for the OSGi framework
and one for standard services.
NOTE
Once upon a time, the letters
OSG
i
were an acronym that stood for the
Open Services Gateway Initiative. This acronym highlights the lineage of the
technology but has fallen out of favor. After the third specification release,
the
OSG
i Alliance officially dropped the acronym, and
OSG
i is now a trade-
mark for the technology.
In the bulk of this topic, we'll discuss the
OSG
i framework, its capabilities, and how to
use these capabilities. Because there are so many standard services, we'll discuss only
the most relevant and useful services, where appropriate. For any service we miss, you
can get more information from the
OSG
i specifications. For now, we'll continue our
overview of
OSG
i by introducing the broad features of the
OSG
i framework.
1.2.1
The OSGi framework
The
OSG
i framework plays a central role when you create
OSG
i-based applications,
because it's the application's execution environment. The
OSG
i Alliance's framework
specification defines the proper behavior of the framework, which gives you a well-
defined
API
to program against. The specification also enables the creation of multi-
ple implementations of the core framework to give you some freedom of choice; there
are a handful of well-known open source projects, such as Apache Felix (
http://
felix.apache.org/
), Eclipse Equinox (
www.eclipse.org/equinox/
)
, and Knopflerfish
(
www.knopflerfish.org/
). This ultimately benefits you, because you aren't tied to a
particular vendor and can program against the behavior defined in the specification.
It's sort of like the reassuring feeling you get by knowing you can go into any McDon-
ald's anywhere in the world and get the same meal!
OSG
i technology is starting to pop up everywhere. You may not know it, but if you
use an
IDE
to do your Java development, it's possible you already have experience with
OSG
i. The Equinox
OSG
i framework implementation is the underlying runtime for