Launching and Embedding Felix
Introduction
The Apache Felix OSGi framework is intended to be easily launchable and embeddable. For example, Felix avoids the use of system properties for configuration, since these are globals that can cause interference if multiple framework instances are created in the same VM. Felix is also implemented to multiplex singleton facilities, like the URL stream handler factory. The goal is to make it possible to use Felix in as many scenarios as possible; however, this is still just a goal. In other words, this is a work in progress and if any issues arise, it would be greatly appreciated if they are brought to the attention of the Felix community. The remainder of this document is divided into two main sections, one focusing on how to launch Felix and one focusing on how to embed Felix into a host application.
Launching Felix
Launching Felix is fairly simple and involves only three steps:
...
Besides configuration properties for the bundle cache, it is usually necessary to set the org.osgi.framework.system.packages configuration property to export packages from the class path, such as the OSGi interface classes (e.g., org.osgi.framework) on which all bundles depend. If you are creating a launcher for Felix, then the felix.auto.start configuration property may also be used to automatically install and start various bundles; see the usage document for more information on configuring Felix and on the various configuration properties.
...
| Anchor |
|---|
| standard-launcher |
|---|
| standard-launcher |
|---|
|
Standard Felix Launcher
Sufficiently detailed description of the standard Felix launcher to go here.
| Anchor |
|---|
| custom-launcher |
|---|
| custom-launcher |
|---|
|
Custom Felix Launcher
This section creates a bare-bones launcher to demonstrate the minimum requirements for creating an interactive launcher for the Felix framework. This example uses the standard Felix shell bundles for interactivity, but any other bundles could be used instead. For example, the shell service and telnet bundles could be used to lauch Felix and make it remotely accessible.
...
After executing this command, a cache/ directory is created that contains the installed bundles, which were installed from the bundle/ directory.
Embedding Felix
to do
| Anchor |
|---|
| host-interaction |
|---|
| host-interaction |
|---|
|
Host/Felix Interaction
to do
| Anchor |
|---|
| host-services |
|---|
| host-services |
|---|
|
Providing Host Application Services
to do
| Anchor |
|---|
| host-service-usage |
|---|
| host-service-usage |
|---|
|
Using Services Provided by Bundles
to do