Home » Documentation » Apache Felix Subproject Documentation » Apache Felix Dependency Manager

Dependency Manager - What's new in version 4?

Even though the focus for this version is to completely redo the internals, we also added a few new features to the code. The most important one is the new thread model, described directly below. Apart from that we also added a few smaller features, enumerated below that.

New thread model

DependencyManager 4 has been significantly reworked to improve support for concurrency. The following principles form the basis of the new concurrency model in DM4.

DependencyManager 4 now also supports parallel execution of component wiring.

Added support for parallelism: To allow components to be started and handled in parallel, you can now register in the OSGi service registry a ComponentExecutorFactory service that is used to get an Executor for the management of all components dependencies/lifecycle callbacks. See javadoc from the org.apache.felix.dm.ComponentExecutorFactory interface for more information.

You can also take a look at the the org.apache.felix.dependencymanager.samples project, which is registering a ComponentExecutorFactory from org.apache.felix.dependencymanager.samples.tpool bundle.

See also the following property in the org.apache.felix.dependencymanager.samples/bnd.bnd

    '!org.apache.felix.dependencymanager.samples.tpool, *',\

Here, all components will be handled by Executors provided by the ComponentExecutorFactory, except those having a package starting with "org.apache.felix.dependencymanager.samples.tpool" (because the threadpool is itself defined using the Dependency Manager API).

You will find a full description of the new thread model in the Reference section.

New features

In addition, some new features have been implemented in dependency manager:

Sample code

The source distribution includes many sample codes which can be run directly under Eclipse and BndTools. The samples are available in the org.apache.felix.dependencymanager.samples/ module. Some of the samples require that you configure some pids or factory pids from Web Console, which can be accessed using http://localhost:8080/system/console/configMgr URL. Please consult org.apache.felix.dependencymanager.samples/README.samples for up to date instructions on how to execute the various examples.

Rev. 1733188 by pderop on Tue, 1 Mar 2016 23:23:14 +0000
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.