Bundle: cm
Version 5.0.1

Configuration Management

The Configuration Management bundle implements the OSGi defined org.orgi.service.cm package, a uniform way to manage bundle configurations.

Description

The Configuration Management bundle is designed to be a uniform way to handle bundle configuration. It contains the ManagedService interfaces to be implemented by bundles that need configuration data, and the ConfigurationAdmin service to be used by management bundles that modify configuration data.

The ConfigurationAdmin interface is the main interface to the Configuration Management component. It is the interface that is registered as a service in the Service Registry and it has methods for creating, retrieving, and listing configurations. The implementation of this interface is responsible for the persistent storage of configurations, and listens for registrations of ManagedServices and ManagedServiceFactories in the Service Registry and passes out configuration data, if available, when they appear.

The cm_commands, bundle provides a console command group to Configuration Management.

The Preference Service, is an alternative method for storing configuration data but it lacks the administrative functions the Configuration Management bundle provides.

Configuration data as XML files

The Knopflerfish CM implementation provides a legacy XML DTD, cm_data.dtd, that specifies one format for storing configurations as XML-documents. The Java package org.knopflerfish.shared.cm contains helper classes for writing and reading this XML format.

The cm_data XML-format is used by the import and export commands provided by the cm_commands console command bundle. It is also supported by the Directory Deployer bundle and by the Desktop plug-in bundle named CM-Desktop.

Limitations that are not specified cm_data.dtd:

Configuration properties

Name Description Value type Default value
com.gatespace.bundle.cm.store Path to a directory that CM will use for its persistent storage. The default location when this property is un-set or empty is a sub-directory named cm_store in the bundles data-directory. This means that all configurations are lost when the framework is restarted with the -init option present (i.e., the framework property org.osgi.framework.storage.clean set to true).

Set this to a path pointing to some writable directory outside the frameworks cache directory (fwdir) if configuration data are to survive -init restarts.

String

See Also

cm_commands, prefs,

Bundle Jar docs

cm_all-5.0.1
cm_api-5.0.1
cm-5.0.1

Exported Packages

PackageVersionProviders
org.knopflerfish.shared.cm1.1.0cm_all-5.0.1, cm-5.0.1
org.osgi.service.cm1.5.0cm_all-5.0.1, cm_api-5.0.1