Knopflerfish 4.0.0
Release Notes
Getting Started
Developer's Doc
Java API docs
Framework and Bundle docs
Bundle jar docs
KF Forum
Bug tracker
Bundle repository
Source (subversion)
Eclipse plugin
Maintained by Makewave
Knopflerfish Pro
Professional Services

OSGi for Business Use

Release Notes Knopflerfish 4.0.0 (OSGi R4 v4.3)

First official release Knopflerfish 4 available from Released 2013-07-12.

Knopflerfish 4 is an implementation of the "OSGi Service Platform Release 4 Version 4.3". It contains all services specified in the "Core Specification" and most of the non Enterprise Edition related services specified in the "Compendium Specification".

The Release Notes include all new features & changes for Knopflerfish 4 compared to the release of Knopflerfish 3.6.0.

OSGi Release 4 Version 4.3 - What is New?

Below is a short summary of the most important new features in OSGi 4.3.

The core OSGi API uses generics which allows for type-safe use of the framework API. I.e. no more casting. Support for Java 1.4 run-time environments is maintained via the -target jsr14 compiler flag.
In OSGi 4.3 a bundle can declare generic requirements and capabilities through the Require-Capability and Provide Capability manifest headers. These two headers are inspected during the resolving phase of the bundle.
Bundle Wiring API
The new Wiring API replaces the PackageAdmin service and also provide information how requirements and provided capabilities have been resolved by the framework.
Adapt pattern
OSGi 4.3 introduces an adapt method on the Bundle class. The new method provides specialized access to the Bundle object, creating a certain view of the bundle, without adding additional methods to the bundle class. The adapt patterns is typically used to replace the former StartLevelService by providing a BundleStartLevel object with the start level operations for a bundle.
Framework hooks
A set of hooks have been added with allows bundles to plug-into the framework for close interaction with the framework. The following hooks exist in 4.3:
  • Resolver Hooks
  • Bundle Hooks
  • Service Hooks
  • Weaving Hooks

Knopflerfish Framework - OSGi Core Specification

OSGi R4 v4.3 specification
All the Core Specification Services and API:s are included and are designed to be compliant with the OSGi R4 v4.3 specification. Please refer to the Contents page for a more detailed description of news in 4.3 and KF4 implementation status.
Framework 6.0.2
Several parts of the framework has been rewritten to handle the new OSGi framework specification and improve stability.
Support for class patching using ASM has been moved out of the framework into a separate classpatcher bundle that implements uses a Weaving Hooks to do the patching.

OSGi Compendium Specification

OSGi R4 v4.3 Specification
All Compendium Specification Services included are updated to implement the OSGi R4 v4.3 specification. Please refer to the Contents page for a more detailed description of news in 4.3 and KF4 implementation status.
The major field of the version of these bundles is set to 4. All imported packages has a minimum version in their import statements set to the version of the package defined in the OSGi R4 v4.3 specification.
The list of OSGi compendium specified bundles below only lists those bundles that has changes in addition to what is required by the move to the OSGi R4 v4.3 specification.
cm 4.0.1
Added a method that saves a list of configurations as XML to
Http 4.0.1
The methods javax.servlet.Request.getLocale() and javax.servlet.Reuqest.getLocales() now returns data based on the Accept-Language header in the request.
Improve error messages when the configured server socket is in use.
Updated the configuration metadata so that it contains all properties in the Http-configuration.
KF-XML- Metatype 4.0.1
Replaced the document describing the configuration metadata with a new one that uses the OSGi specified meta type schema.
Improved support for mixing legacy KF-Metatype and OSGi meta type.

Knopflerfish Services

Deprecation of SOAP bundles
The SOAP related bundles present in Knopflerfish 3 has been removed since they are deprecated and should be replaced by usage of the Remote Service Admin service from the compendium specification. The removed bundles are: axis-osgi, axis2-osgi, ksoap-osgi, ksoap_commandgroup, ksoap_remotefw, soap_desktop, soap_remotefw, soapclient and soapobject.
Class Patcher 1.0.0
This bundle contains the support for class patching using ASM that was previously implemented in the framework. It is implemented as a Weaving Hooks. The configuration properties remain the same in order to be backward compatible.
CM-Commands 4.0.1
Added export command that exports all matching configurations as an XML-document.
CM-Desktop 4.0.0
Added Export... button that exports the currently showing configuration as a cm_data XML document suitable for use together with the Directory Deployer bundle.
The displayer always shows the combo boxes for PIDs and factory PIDs (they are disabled when the bundle does not provide meta data for any PID of that type) in its top part.
The sub-panel showing details for a factory PID always shows all the controls (New, Delete, Apply, PID selector), those not applicable are disabled.
The PID selector combo box in the factory PID sub-panel contains a choice that is labeled "- Default Values -" when this is selected the properties below will be set to the default values according the meta type information for the current factory PID.
When selecting the CM-displayer for a bundle that only defines factory PIDs the factory PID sub-panel will be initialized to show the last (lexicographically) instance for the factory PID.
The CM-displayer now uses a configuration listener to know when the configuration it shows is changed and then update its presentation.
Fixed the layout when there was an active error message for a numeric configuration property.
Command TTY 4.0.1
Fixed an error in the meta-type document describing the configuration.
Console 4.0.1
Added support to Util.showObject(Object) for converting enumerations and collections to strings showing each element.
Desktop 4.0.1
A new "Wiring" displayer has been added that presents information from new wiring API. This displayer replaces the "Package" displayer that only showed wiring info for the osgi.wiring.package namespace.
Uses the wiring API to perform refresh and resolve operations.
Use the start-level API to perform start-level operations.
Improve layout of the tool-bar by add some glue to the left of the start level label. In the start-level drop-down, emphasis the start-level number and present the bundles on each start level as list using a smaller, weaker font.
Added additional overlay images in the Bundle Icon view to indicate the following bundle states: RESOLVED, STARTING and STOPPING.
Added bundle life-cycle operations (resolve, start, stop, update, uninstall) to the pop-up menu in the bundle icon displayer (top left part of the main window).
Bundle life-cycle operations (resolve, start, stop, update, refresh, uninstall) in the menu, in the pop-up menu and in the tool-bar are now enabled based on the states of the selected bundles.
Renamed the "Details" view (the top left side of the main window) to "Table" view and added columns for the bundle version and bundle symbolic name to it.
Restored the functionality of the "Cancel" button in the quit dialog on Mac OS X. This was broken by changes in Apples EAWT packages. The new implementation requires Java Update 8 or later for Mac OS 10.5, Java Update 3 for Mac OS 10.6, or Mac OS 10.7 or later to be fully functional.
The navigation buttons (backward / forward) at the bottom of the services-tab was not activated when pressing one of the service links.
The Log-tab now presents initial log entries obtained by calling the getLog()-method of a LogReaderService in the correct order, i.e., oldest first.
Add refresh bundles operation to the tool-bar as well as to the pop-up menu in the icons display.
The topmost lines in the manifest view have been given a different background color to emphasize that they are not part of the manifest. The bundle state line now includes the text "pending refresh" for bundles that has more than one bundle revision in use, i.e, bundles that needs to be refreshed. The start level line now contains the text "persistently started" for bundles that are persistently started. I.e., for bundles that will be started again when the framework itself is restarted.
The closure tab as well as the File-menu save deployment archive now computes the closure of bundles to include correctly. Before it took the union of a capability dependencies closure and a service dependencies closure which will miss bundles that provides capabilities to service implementor bundles that was not in the original capabilities closure.
Restored and enhanced the update check functionality that pops up a window with the release notes from the current Knopflerfish release when the desktop is running on an older Knopflerfish release.
Added sorting to the "Table" view (the top left side of the main window). Click on the column header to sort rows based on the column values, shift-click for reverse order.
The tool tip text for bundle icons in the icons display is now always up to date. The start-level line of the text will contain the text "persistently started" if the bundle is persistently started.
Directory Deployer 4.0.1
Deployment of XML-files with OSGi configurations is now supported.
New configuration option "Use initial start level" which when set to true (default) tells the directory deployer to not assign any start level to the bundle. I.e., the bundle will be assigned the initial start level that can be set up using the startlevel-API.
The directory deployer will only try to install (start) a bundle once. If it fails users are supposed to update the file with new contents (or touch it to change the time-stamp) to get a new install (start) attempt made.
If the deployed file is a fragment bundle one attempt to resolve it will be made after installation (and after each update).
Changed to use normal file-URLs as location when installing bundles from the scanned directories.
Replaced the document describing the configuration meta data with a new one that uses the OSGi specified meta type schema.
Framework Commands 4.0.1
New command 'capability' that presents both provided and required capabilities for the current bundle revision of a bundle.
New command 'wiring' that lists all active wires for the current wiring of a bundle.
New command 'pending' that lists bundles that have pending updates.
The call command now supports calling methods with parameters of type org.osgi.framework.Bundle. Type the bundle id (long) as parameter value to the call command.
The call command now correctly handles calls to methods in interfaces of an interface that the service object implements.
Log Commands 4.0.0
Calling the command "logconfig memory <int>" did not change the memory limit, but calling "logconfig memory -c <int>" did. Now both calls changes the limit on the number of log entries that are kept in memory as expected.
Log Service 4.0.1
Fixed an error in the meta type document describing the configuration.
Telnet-Console 4.0.1
Replaced the document describing the configuration metadata with a new one that uses the OSGi specified meta type schema.
Added a number of properties to the configuration metadata: defaultUser, defaultPassword, busywait, um, requiredGroup, forbiddenGroup.
Added an icon to the bundle (same icon as for the tty-console).
TTY-Console 4.0.1
Fixed an error in the meta type document describing the configuration.

Misc, start scripts, build system etc

Knopflerfish Build System
The "API"-variant of a bundle contains the bundles API.

The "IMPL"-variant of a bundle contains the implementation, but not API. It may export packages that are not part of the official API, selected by the property impl-api.pattern.

The "ALL"-variant of a bundle contains both the API and the implementation. It may also export additional packages, often those packages that it imports (to make the bundle self-contained). These extra packages are selected by the property all-api.pattern.

There is also a property, all.pattern that can be used to select additional contents for the "ALL"-variant of the bundle.

Added support for generation of maven source artifacts for all variants of the bundle. This is controlled by the ant property named
Added support for generation of maven javadoc artifacts for all variants of the bundle. This is controlled by the ant property named A javadoc artifact is only built for bundles that has a public API, i.e., bundles that exports at least one package since the javadoc artifact only documents the exported packages.
Android .apk Support
Directory tools/android/apk has been added. It contains Android projects for the Knopflerfish framework (library project) and an example application, and a build system that allows you to specify the Knopflerfish bundles to package together with framework.jar into an Android .apk file.

The example application has a simple Android View from where the user can launch the framework (included bundles will be installed and started) and then browse the local Knopflerfish HTTP root or console.