Equinox-Specific Features

This document describes the Equinox-specific features included in the Framework Professional Edition Package .

Contents:


Overview

Framework Professional Edition Package includes a number of features that enable using Equinox bundles without need of any additional modifications or configuration. These features concern the usage of Equinox modules on a level of framework and on a level of bundles.

Besides the Equinox-specific features, Framework Professional Edition Package includes four Equinox bundles. For further information on these bundles, refer to the "Equinox Bundles" document.

Framework-Related Features

Lazy Initialization

Overview

Framework Professional Edition Package includes the lazy initialization mechanism, defined in Equinox 3.3M7 and used by Equinox bundles. This mechanism is based on the Lazy Activation Policy of bundles defined by Equinox. Generally, it states that a bundle declared as lazy must be activated only upon the first successful class loading request for some of its classes. This allows to start the framework with a very constrained set of active bundles and activate the others only when there is an actual need of their classes. For details on the Lazy Activation Policy, refer to the "Lazy Start Bundles" Eclipse document and the "Lazy Activation Policy" OSGi document.

Turning Equinox Lazy Support On

Equinox lazy initialization is turned on by setting the mbs.bundles.osgilazy system property to true prior to framework startup (see the "System Properties" document for more information about setting system properties).

Supported Manifest Headers

In particular, the Framework Professional Edition Package supports the following Eclipse lazy manifest headers - Eclipse-AutoStart, Bundle-ActivationPolicy and Eclipse-LazyStart.

Differences in Lazy Support between Equinox and ProSyst

Due to implementation specifics of the professional OSGi framework developed by ProSyst, there are the following differences in lazy bundle activation between Equinox and ProSyst:

  1. In Equinox, lazy activation bundles are in the RESOLVED state. In the mBS professional OSGi framework, such bundles enter the STARTING state, which indicates that at class loading they will be automatically activated.
  2. In contrast to the ProSyst OSGi framework, in Equinox there are no "starting" events when lazy activation bundles are lazily activated.
  3. In Equinox, a lazy activation bundle is started before the trigger class is defined. In the ProSyst professional framework, the bundle is activated after the trigger class is defined - otherwise, this might lead to recursive class loading and generation of activation request for other lazy bundles. In detail, a set of the lazy bundles which need activation in order to define a trigger class is formed. When the class loading is over, the bundles from the set are activated in the order in which the classes have been loaded from them. When the activation is over, the framework returns the defined trigger class.

Loading Bundles from Directories

This feature enables installing bundles who's resources are located in directories instead in JAR files. Such "unpacked" bundles are installed from URLs that target bundle directories instead of bundle JAR files.

Installing Bundles by Reference URL

This feature allows installing bundles without copying their content to the storage but loading them from a specified reference location. Reference URLs can be used only through the OSGi Framework API in the following way:

            . . . 
    URL url = new URL("reference:file:D:/bundles/my_bundle.jar");
    InputStream is = url.openStream();
    bundleContext.installBundle("bundle_location", is);
            . . . 

Depending on the JVM and the operating system, you might be able to use relative URLs, usually related to the current working directory.

Bundle-Related Features

Utility Services and Classes

Generally, the Equinox-specific utility classes and services included in the Framework Professional Edition Package enable the deployment and usage of Equinox bundles. In brief, they provide support for maintaining the Equinox runtime environment. The URL Converter protocol Equinox uses is included as well as log utility implementation of Equinox.

Extension Registry

Framework Professional Edition Package maintains support for the Eclipse Extension Registry that enables the usage of Eclipse plug-ins in the framework. Plug-in in terms of Eclipse is equal to OSGi bundle and conceptually performs exactly the same functions - deliver certain functionality and resources to the system. Plug-ins are packed in JAR files and have plugin.xml manifest files that describe the extension points plug-ins register. An extension point is a well defined point that other plug-ins can extend with custom implementations called extensions. The whole set of installed plug-ins, the extension points they register and the provided extensions is maintained by the Extension Registry. For further information on the Extension Registry, refer to the Eclipse 3.2 Documentation.

Equinox OSGi Preferences Services Extension

Framework Professional Edition Package also provides the Equinox extension to the OSGi Preferences Service that enables a storage for Eclipse plug-in preferences. For details, refer to the Eclipse 3.2 Documentation.

References


Framework Professional Edition Package