Launching and Embedding Felix
Introduction
...
The 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.
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:
...
The only configuration properties that are actually required to start Felix are ones that tell it where/how to locate the bundle cache profile directory where installed bundles will be cached. Felix' bundle cache implementation allows you to configure the location where bundles are cached using configuration properties. At a minimum, either a bundle cache profile name or directory must be specified; see the bundle cache document for more detailed information on configuring the bundle cache.
| 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
...