Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You use the framework factory to construct and configure a framework instance (or by directly instantiating the Felix class). The configuration map may contain the following OSGi standard properties:

  • org.osgi.framework.system.packages - specifies a list of packages the system bundle should export from the environment; if this is not set, then the framework uses a reasonable default.
  • org.osgi.framework.system.packages.extra - specifies a list of additional packages the system bundle should export from the environment that are appended to the packages specified in org.osgi.framework.system.packages; there is no default value for this property.
  • org.osgi.framework.bootdelegation - specifies a list of packages that should be made implicitly available to all bundles from the environment (i.e., no need to import them); there is no default value for this property and its use should be avoided.
  • org.osgi.framework.bundle.parent - Specifies which class loader is used for boot delegation. Possible values are: boot for the boot class loader, app for the application class loader, ext for the extension class loader, and framework for the framework's class loader. The default is boot.
  • org.osgi.framework.storage - specifies the path to a directory, which will be created if it does not exist, to use for bundle cache storage; the default value for this property is "felix-cache" in the current working directory.
  • org.osgi.framework.storage.clean - specifies whether the bundle cache should be flushed; the default value for this property is "none", but it can be changed to "onFirstInit" to flush the bundle cache when the framework is initialized.
  • org.osgi.framework.startlevel.beginning - specifies the start level the framework enters upon startup; the default value for this property is 1.

Felix also has the following, non-standard configuration properties:

  • felix.cache.rootdir - specifies which directory should be used to calculate absolute paths when relative paths are used for the org.osgi.framework.storage property; the default value for this property is the current working directory.
  • felix.systembundle.activators - specifies a List of BundleActivator instances that are started/stopped when the System Bundle is started/stopped; the specified instances will receive the System Bundle's BundleContext when invoked.
  • felix.log.logger - specifies an instance of org.apache.felix.framework.util.Logger that the framework uses as its default logger.
  • felix.log.level - specifies an integer String whose value indicates the degree of logging reported by the framework; the default value is "1" and "0" turns off logging completely, otherwise log levels match those specified in the OSGi Log Service (i.e., 1 = error, 2 = warning, 3 = information, and 4 = debug).
  • felix.startlevel.bundle - specifies the start level for newly installed bundles; the default value is 1.
  • felix.bootdelegation.implicit - specifies whether or not the framework should try to guess when to boot delegate when external code tries to load classes or resources; the default value is "true".
  • framework.service.urlhandlers - specifies whether or not to activate the URL Handlers service for the framework instance; the default value is "true", which results in the URL.setURLStreamHandlerFactory() and URLConnection.setContentHandlerFactory() being called.

any of the framework configuration properties listed in the Apache Felix Framework Configuration Properties document, not the launcher configuration properties. The configuration map is copied and the keys are treated as case insensitive. You are not able to change the framework's configuration after construction. If you need a different configuration, you must create a new framework instance.

Warning
titleWARNING

Felix configuration properties have change considerably starting from 1.4.0; if you are upgrading from an earlier version, the usage configuration property document describes the configuration property changes.

...