Author: buildbot
Date: Tue Mar 10 21:16:40 2015
New Revision: 943250
Log:
Staging update by buildbot for felix
Modified:
websites/staging/felix/trunk/content/ (props changed)
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/annotations.html
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/background.html
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/design-patterns.html
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/development.html
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/history.html
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/javadocs.html
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/migrating-from-earlier-versions.html
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/migrating-from-other-solutions.html
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/performance-tuning.html
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/resources.html
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew.html
Propchange: websites/staging/felix/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Mar 10 21:16:40 2015
@@ -1 +1 @@
-1665700
+1665701
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/annotations.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/annotations.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/annotations.html
Tue Mar 10 21:16:40 2015
@@ -18,7 +18,7 @@
limitations under the License.
-->
<head>
- <title>Apache Felix - Dependency Manager SpellChecker Sample</title>
+ <title>Apache Felix - Dependency Manager - Annotations</title>
<link rel="icon" href="/res/favicon.ico">
<link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
<link rel="stylesheet" href="/res/codehilite.css" type="text/css"
media="all">
@@ -62,19 +62,15 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
- <h1>Dependency Manager SpellChecker Sample</h1>
- <p>This section presents a quick overview of the capabilities and usage
of the
-DependencyManager java 5 annotations. In particular, we will recap the
DependencyManager
-annotation architecture, and identify some simple usage scenarios using a
SpellChecker
-sample application with annotated components.
-The application is available from the felix trunk, in the
dependencymanager/samples.annotation
-subproject.</p>
-<h2 id="architecture">Architecture</h2>
+ <h1>Dependency Manager - Annotations</h1>
+ <p>This section presents a quick overview of the capabilities and usage
of the DependencyManager Java annotations. In particular, we will recap the
DependencyManager annotation architecture, and identify some simple usage
scenarios using a SpellChecker
+sample application with annotated components. The application is available
from the felix trunk, in the <code>dependencymanager/samples.annotation</code>
subproject.</p>
+<h1 id="architecture">Architecture</h1>
<p>Instead of writing Activators which extends the DependencyActivatorBase
class, service
components can now be annotated using the annotations provided by the
<em>org.apache.felix.dependencymanager.annotation</em> bundle. Annotations are
not reflectively
@@ -91,7 +87,7 @@ component lifecycle and dependencies. Th
DependencyManager programmatic API in order to manage the annotated
components.
Annotated components can then be inspected with the DependencyManager Gogo
shell, as it is
the case with DM components declared through the programmatic DM API.</p>
-<h2 id="registering-a-service">Registering a Service</h2>
+<h1 id="registering-a-service">Registering a Service</h1>
<p>To register a service, your can annotate your class with a
<em>@Component</em> annotation, and
an instance of your class will be registered under all directly implemented
interfaces
into the OSGi registry. You can however take control on the interfaces to be
exposed, and
@@ -132,7 +128,7 @@ thing required is to provide the Pojos w
COMMAND_FUNCTION) which will be used by the Gogo runtime when instropecting
the Pojo
for invoking the proper functions.</p>
<p>So, coming back to the sample code, the SpellChecker class registers
itself into the OSGi registry, using the <em>provides</em> attribute, which
just refer to our SpellChecker class, and the two mandatory Gogo service
properties are also specified using the <em>@Property</em> annotation. It is
not shown here, but service properties can also be provided dynamically from a
method that can return a Map, and annotated with the <em>@Start</em> lifecycle
callback, but we will see this feature in a another section.</p>
-<h2 id="depending-on-a-service">Depending on a Service</h2>
+<h1 id="depending-on-a-service">Depending on a Service</h1>
<p>Our SpellChecker component can expose itself as a Gogo shell command, but
before being
registered into the OSGi registry, we also need to be injected with two
dependencies:
one required dependency (at minimum) on a DictionaryService, and another
optional one on
@@ -209,7 +205,7 @@ this behavior is different from the API,
DictionaryService services in our dictionary list, which is used when checking
word
existence. This list is a copy on write list because the dependency may be
injected at
any time, possibly from another thread. So, using a copy on write list avoid
us to use synchronized methods.</p>
-<h2 id="creating-a-service-from-configadmin">Creating a Service from
ConfigAdmin</h2>
+<h1 id="creating-a-service-from-configadmin">Creating a Service from
ConfigAdmin</h1>
<p>The <em>@Component</em> annotation is not the only one for creating
services. Another one is
the <em>@FactoryConfigurationAdapterService</em> annotation which allows to
instantiate many
instances of the same annotated service class from ConfigAdmin (and
WebConsole).
@@ -317,7 +313,7 @@ So, let's revisit our DisctionaryImpl se
</pre></div>
-<h2 id="providing-an-aspect">Providing an Aspect</h2>
+<h1 id="providing-an-aspect">Providing an Aspect</h1>
<p>As we have seen in the previous section, there are many annotations that
can be used
to specify a service. Another one is the <em>@AspectService</em> annotation.
This annotation
allows to <em>decorate</em> an existing service in order to add certain
"capabilities" to it,
@@ -385,14 +381,14 @@ the aspect chain ordering (multiple aspe
used to configure the extra English words from ConfigAdmin. This annotation
normally
requires a pid parameter, which is a persistent identifier uniquely
identifying our
component, but by default, the pid is set to the fully qualified name of our
class.</p>
-<h2 id="how-to-run-the-sample-code">How to run the sample code</h2>
+<h1 id="how-to-run-the-sample-code">How to run the sample code</h1>
<p>Just import the Dependency source distribution in bndtools and check the
following samples:</p>
<ul>
<li>org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/README</li>
<li>org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/README</li>
</ul>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1664580 by pderop on Fri, 6 Mar 2015 10:14:58 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/background.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/background.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/background.html
Tue Mar 10 21:16:40 2015
@@ -18,7 +18,7 @@
limitations under the License.
-->
<head>
- <title>Apache Felix - Apache Felix Dependency Manager - Background</title>
+ <title>Apache Felix - Dependency Manager - Background</title>
<link rel="icon" href="/res/favicon.ico">
<link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
<link rel="stylesheet" href="/res/codehilite.css" type="text/css"
media="all">
@@ -62,13 +62,13 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
- <h1>Apache Felix Dependency Manager - Background</h1>
- <h2 id="background">Background</h2>
+ <h1>Dependency Manager - Background</h1>
+ <h1 id="background">Background</h1>
<p>In an OSGi framework, services are deployed using bundles and these bundles
feature two types of dependencies: </p>
<ol>
<li>Package dependencies. A bundle can export a package which others import.
These dependencies, although dynamic, are relatively easy to handle and the
whole resolution process is handled by the OSGi framework for you.</li>
@@ -79,7 +79,7 @@
<p>The second is managing service dependencies at runtime. As mentioned
before, a service oriented architecture is dynamic by design, so your
implementation should be able to deal with this. Bundles can start in any order
and any service can go away or be replaced by a different implementation at any
point in time. OSGi itself offers basic assistance for tracking services. You
can track them yourself by registering as a service listener. A slightly more
advanced way is to create a service tracker, which you can subsequently query,
or have it notify you on changes. All of these are too low-level to be good
building blocks for developers.</p>
<p>In real implementations, you are probably going to track multiple services.
Using service trackers in such a scenario has the tendency to result in
dependency logic that is entangled in the implementation instead of being
expressed in a declarative way. Using a declarative way to specify dependencies
has clear advantages when it comes to monitoring and managing them, a task that
becomes more and more important in modern, federated, service oriented
environments.</p>
<p>The Dependency Manager provides you with the right building blocks to
declaratively specify dependencies using a straightforward Java API that is
easy to maintain and refactor.</p>
-<h2 id="design-goals">Design Goals</h2>
+<h1 id="design-goals">Design Goals</h1>
<p>The goals that drove the design of the dependency manager are:</p>
<ul>
<li>Provide a clean separation between a component implementation and the
"glue" that binds it to the OSGi framework. The component implementation should
not have to contain any OSGi specific code. In other words, it should be a POJO
(Plain Old Java Object).</li>
@@ -89,7 +89,7 @@
<li>Supporting powerful high level design patterns. When building real-world
applications, more complex patterns need to be used, such as aspects and
adapters. Support for these needs to be built into the core.</li>
</ul>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1663924 by marrs on Wed, 4 Mar 2015 10:39:19 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/design-patterns.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/design-patterns.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/design-patterns.html
Tue Mar 10 21:16:40 2015
@@ -18,7 +18,7 @@
limitations under the License.
-->
<head>
- <title>Apache Felix - Apache Felix Dependency Manager - Design
Patterns</title>
+ <title>Apache Felix - Dependency Manager - Design Patterns</title>
<link rel="icon" href="/res/favicon.ico">
<link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
<link rel="stylesheet" href="/res/codehilite.css" type="text/css"
media="all">
@@ -62,21 +62,21 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
- <h1>Apache Felix Dependency Manager - Design Patterns</h1>
- <h2 id="osgi-design-patterns">OSGi Design Patterns</h2>
+ <h1>Dependency Manager - Design Patterns</h1>
+ <h1 id="osgi-design-patterns">OSGi Design Patterns</h1>
<p>This section lists a couple of design patterns as they can be applied in an
OSGi context.</p>
-<h3 id="singleton-service">Singleton Service</h3>
+<h2 id="singleton-service">Singleton Service</h2>
<p>Provides a service as long as its dependencies are resolved.</p>
-<h4 id="motivation">Motivation</h4>
+<h3 id="motivation">Motivation</h3>
<p>In a dynamic framework, services can come and go. Components that publish a
service are often themselves dependent on other services to perform their task.
In such cases, they have a dependency on those services and it makes sense to
only publish their own services when these dependencies are available. Being
able to declare such dependencies in code ensures consistent life cycle
behavior.</p>
-<h4 id="structure">Structure</h4>
+<h3 id="structure">Structure</h3>
<p><img src="./diagrams/singleton.png" alt="Singleton" style="width:
190px"/></p>
-<h4 id="code-example">Code Example</h4>
+<h3 id="code-example">Code Example</h3>
<div class="codehilite"><pre><span class="n">public</span> <span
class="n">class</span> <span class="n">Activator</span> <span
class="n">extends</span> <span class="n">DependencyActivatorBase</span> <span
class="p">{</span>
<span class="n">public</span> <span class="n">void</span> <span
class="n">init</span><span class="p">(</span><span
class="n">BundleContext</span> <span class="n">context</span><span
class="p">,</span> <span class="n">DependencyManager</span> <span
class="n">manager</span><span class="p">)</span> <span class="n">throws</span>
<span class="n">Exception</span> <span class="p">{</span>
<span class="n">manager</span><span class="p">.</span><span
class="n">add</span><span class="p">(</span><span
class="n">createComponent</span><span class="p">()</span>
@@ -98,13 +98,13 @@
</pre></div>
-<h3 id="aspect-service">Aspect Service</h3>
+<h2 id="aspect-service">Aspect Service</h2>
<p>Provides an aspect on top of a specific type of service.</p>
-<h4 id="motivation_1">Motivation</h4>
+<h3 id="motivation_1">Motivation</h3>
<p>In aspect oriented programming, supporting functions are isolated from the
main application's business logic. This increases modularity at the source
level by allowing the separation of cross-cutting concerns. In OSGi we want to
extend this modularity to the runtime, therefore we implement aspects to work
on certain services, where the aspect itself publishes that same service but
(usually) with a higher priority. This allows you to dynamically add and remove
aspects.</p>
-<h4 id="structure_1">Structure</h4>
+<h3 id="structure_1">Structure</h3>
<p><img src="./diagrams/aspect.png" alt="Aspect" style="width: 190px"/></p>
-<h4 id="code-example_1">Code Example</h4>
+<h3 id="code-example_1">Code Example</h3>
<div class="codehilite"><pre><span class="n">public</span> <span
class="n">class</span> <span class="n">Activator</span> <span
class="n">extends</span> <span class="n">DependencyActivatorBase</span> <span
class="p">{</span>
<span class="n">public</span> <span class="n">void</span> <span
class="n">init</span><span class="p">(</span><span
class="n">BundleContext</span> <span class="n">context</span><span
class="p">,</span> <span class="n">DependencyManager</span> <span
class="n">manager</span><span class="p">)</span> <span class="n">throws</span>
<span class="n">Exception</span> <span class="p">{</span>
<span class="n">manager</span><span class="p">.</span><span
class="n">add</span><span class="p">(</span><span
class="n">createAspectService</span><span class="p">(</span><span
class="n">Manageable</span><span class="p">.</span><span
class="n">class</span><span class="p">,</span> "<span
class="p">(</span><span class="n">monitor</span><span class="p">=</span><span
class="n">true</span><span class="p">)</span>"<span class="p">,</span>
50<span class="p">)</span>
@@ -130,13 +130,13 @@
</pre></div>
-<h3 id="adapter-service">Adapter Service</h3>
+<h2 id="adapter-service">Adapter Service</h2>
<p>Provides an adapter for a specific type of service.</p>
-<h4 id="motivation_2">Motivation</h4>
+<h3 id="motivation_2">Motivation</h3>
<p>Like with aspects, sometimes you want to create adapters for certain
services, which add certain behavior that results in the publication of (in
this case) a different service. Adapters can dynamically be added and removed
and allow you to keep your basic services implementations clean and simple,
adding extra features on top of them in a modular way. </p>
-<h4 id="structure_2">Structure</h4>
+<h3 id="structure_2">Structure</h3>
<p><img src="./diagrams/adapter.png" alt="Adapter" style="width: 190px"/></p>
-<h4 id="code-example_2">Code Example</h4>
+<h3 id="code-example_2">Code Example</h3>
<div class="codehilite"><pre><span class="n">public</span> <span
class="n">class</span> <span class="n">Activator</span> <span
class="n">extends</span> <span class="n">DependencyActivatorBase</span> <span
class="p">{</span>
<span class="n">public</span> <span class="n">void</span> <span
class="n">init</span><span class="p">(</span><span
class="n">BundleContext</span> <span class="n">context</span><span
class="p">,</span> <span class="n">DependencyManager</span> <span
class="n">manager</span><span class="p">)</span> <span class="n">throws</span>
<span class="n">Exception</span> <span class="p">{</span>
<span class="n">manager</span><span class="p">.</span><span
class="n">add</span><span class="p">(</span><span
class="n">createAdapterService</span><span class="p">(</span><span
class="n">Manageable</span><span class="p">.</span><span
class="n">class</span><span class="p">,</span> "<span
class="p">(</span><span class="n">publish</span><span class="p">=</span><span
class="n">servlet</span><span class="p">)</span>"<span class="p">)</span>
@@ -164,29 +164,29 @@
</pre></div>
-<h3 id="resource-adapter-service">Resource Adapter Service</h3>
+<h2 id="resource-adapter-service">Resource Adapter Service</h2>
<p>Provides an adapter for a specific type of resource.</p>
-<h4 id="motivation_3">Motivation</h4>
+<h3 id="motivation_3">Motivation</h3>
<p>Resource adapters are similar to normal adapters, but instead of requiring
a service, they require a resource and provide a service on top of it.
Resources are an abstraction that is introduced by the dependency manager,
represented as a URL. They can be implemented to serve resources embedded in
bundles, somewhere on a file system or in a content repository or database.</p>
-<h4 id="structure_3">Structure</h4>
+<h3 id="structure_3">Structure</h3>
<p><img src="./diagrams/resourceadapter.png" alt="Singleton" style="width:
180px"/></p>
-<h3 id="temporal-dependency">Temporal Dependency</h3>
+<h2 id="temporal-dependency">Temporal Dependency</h2>
<p>Provides a proxy that hides the service dynamics of a dependency, even if
it disappears for a short time.</p>
-<h4 id="motivation_4">Motivation</h4>
+<h3 id="motivation_4">Motivation</h3>
<p>As a service consumer, you sometimes do not want to deal with the dynamics
of services and the fact that they tend to go away for short periods of time
whilst their hosting bundle gets updated. A temporal dependency provides you
with a proxy that hides these dynamics and blocks your calls if you try to
invoke a method on a service that is currently "updating". The maximum time to
wait is configurable and you will get an exception if no new service becomes
available before that time.</p>
-<h4 id="structure_4">Structure</h4>
-<h3 id="null-object">Null Object</h3>
+<h3 id="structure_4">Structure</h3>
+<h2 id="null-object">Null Object</h2>
<p>Provides an implementation of an object that does nothing and can be used
in the absence of the real object.</p>
-<h4 id="motivation_5">Motivation</h4>
+<h3 id="motivation_5">Motivation</h3>
<p>When a component depends on a service, but the dependency is optional, it
means that it will use this service when available, but it can still operate if
it's not. Constantly checking in your code if a service is actually available
tends to lead to code with a lot of "<code>if (service != null)
service.invoke();</code>" constructions which do not help with code
readability. Instead, the dependency manager offers you a mechanism where it
will inject null objects for services that are currently not available so you
can simply invoke methods on them that "do nothing".</p>
-<h4 id="structure_5">Structure</h4>
-<h3 id="whiteboard">Whiteboard</h3>
+<h3 id="structure_5">Structure</h3>
+<h2 id="whiteboard">Whiteboard</h2>
<p>Handles listeners by leveraging the OSGi service registry to publish and
look them up.</p>
-<h4 id="motivation_6">Motivation</h4>
+<h3 id="motivation_6">Motivation</h3>
<p>The traditional model for dealing with listeners in Java needlessly
complicates things in an OSGi context. Instead of having listeners registering
themselves with the component that will invoke them on any change, a listener
simply registers itself in the service registry and the component will do a
lookup of all relevant services. This is explained in more detail on the
OSGi.org wiki in the <a
href="http://www.osgi.org/wiki/uploads/Links/whiteboard.pdf">"Listeners
considered harmful: the 'whiteboard' pattern"</a> article.</p>
-<h4 id="structure_6">Structure</h4>
+<h3 id="structure_6">Structure</h3>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1665356 by uiterlix on Mon, 9 Mar 2015 20:52:57 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/development.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/development.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/development.html
Tue Mar 10 21:16:40 2015
@@ -18,7 +18,7 @@
limitations under the License.
-->
<head>
- <title>Apache Felix - Apache Felix Dependency Manager - Development</title>
+ <title>Apache Felix - Dependency Manager - Development</title>
<link rel="icon" href="/res/favicon.ico">
<link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
<link rel="stylesheet" href="/res/codehilite.css" type="text/css"
media="all">
@@ -62,16 +62,16 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
- <h1>Apache Felix Dependency Manager - Development</h1>
+ <h1>Dependency Manager - Development</h1>
<p>When downloading or checking out the source code, please also consult
release/resources/src/README.src for up to date instructions on how to build
that particular version.</p>
-<h2 id="prerequisites">Prerequisites</h2>
+<h1 id="prerequisites">Prerequisites</h1>
<p>If you are building a released
<code>org.apache.felix.dependencymanager-r<n>-src.zip</code> artifact,
then you also have to extract the
<code>org.apache.felix.dependencymanager-r<n>-deps.zip</code> in the same
directory where you have extracted the source archive. There is no need to do
this if you have checked out from the Felix trunk in Subversion.</p>
-<h2 id="compilation-using-gradle">Compilation Using gradle:</h2>
+<h1 id="compilation-using-gradle">Compilation Using gradle:</h1>
<ul>
<li>
<p>Install Java 7.</p>
@@ -93,7 +93,7 @@
<p>$ ./gradlew check</p>
</li>
</ul>
-<h2 id="compilation-using-eclipse">Compilation Using Eclipse:</h2>
+<h1 id="compilation-using-eclipse">Compilation Using Eclipse:</h1>
<ul>
<li>Install either Eclipse Kepler SR2 or Eclipse Luna.</li>
<li>Use the dependency manager folder as the root of your workspace.</li>
@@ -113,7 +113,7 @@
<li>Click on org.apache.felix.dependencymanager.runtime.itest and run it as
""Bnd OSGi Test Launcer (Junit)".</li>
</ul>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1664040 by marrs on Wed, 4 Mar 2015 15:21:58 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/history.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/history.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/history.html
Tue Mar 10 21:16:40 2015
@@ -18,7 +18,7 @@
limitations under the License.
-->
<head>
- <title>Apache Felix - Apache Felix Dependency Manager - History</title>
+ <title>Apache Felix - Dependency Manager - History</title>
<link rel="icon" href="/res/favicon.ico">
<link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
<link rel="stylesheet" href="/res/codehilite.css" type="text/css"
media="all">
@@ -62,20 +62,20 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
- <h1>Apache Felix Dependency Manager - History</h1>
- <h2 id="the-early-years">The early years</h2>
+ <h1>Dependency Manager - History</h1>
+ <h1 id="the-early-years">The early years</h1>
<p>The first version of the Dependency Manager was created when Marcel started
working on his first commercial OSGi project back in 2002. At that time, the
OSGi specification was still at R2, and the only solution for managing
dependencies was "service binder" which did not support the dynamics we needed
at that time. Therefore, dependency manager was created, based on a fluent,
declarative Java API.</p>
<p>In 2005, after writing a white paper, dependency manager was presented at
the OSGi DevCon in Paris. At that time, the project had been open sourced, but
not yet at Apache. When the Oscar project finally decided to move to the
incubator, where it became Felix, Dependency Manager was one of the subprojects
that joined.</p>
-<h2 id="life-at-apache">Life at Apache</h2>
+<h1 id="life-at-apache">Life at Apache</h1>
<p>The move to Apache definitely gave the project a lot more visibility and,
besides a larger user base, also attracted a few very talented developers.
Xander did a lot of work in getting some of the higher level design patterns
implemented, and Pierre added support for annotations and ensured that the code
ran well on really big, multi-core systems.</p>
<p>In 2014, after many discussions about new features and improvements we
would like to add, we started experimenting with a completely new codebase,
redesigning some aspects from the ground up based on all the knowledge and
experience that we had gained over the years. About a year later, that lead to
the release of Dependency Manager 4.</p>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1663924 by marrs on Wed, 4 Mar 2015 10:39:19 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/javadocs.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/javadocs.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/javadocs.html
Tue Mar 10 21:16:40 2015
@@ -18,7 +18,7 @@
limitations under the License.
-->
<head>
- <title>Apache Felix - Apache Felix Dependency Manager - Javadocs</title>
+ <title>Apache Felix - Dependency Manager - JavaDocs</title>
<link rel="icon" href="/res/favicon.ico">
<link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
<link rel="stylesheet" href="/res/codehilite.css" type="text/css"
media="all">
@@ -62,15 +62,15 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
- <h1>Apache Felix Dependency Manager - Javadocs</h1>
- <p>The various Dependency Manager javadocs for the API, the Annotations,
and the Runtime can be found from the <a
href="http://felix.apache.org/apidocs/">main felix apidocs homepage</a>.</p>
+ <h1>Dependency Manager - JavaDocs</h1>
+ <p>The various Dependency Manager JavaDocs for the API, the Annotations,
and the Runtime can be found from the <a
href="http://felix.apache.org/apidocs/">main felix apidocs homepage</a>.</p>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1664757 by pderop on Fri, 6 Mar 2015 23:01:58 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/migrating-from-earlier-versions.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/migrating-from-earlier-versions.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/migrating-from-earlier-versions.html
Tue Mar 10 21:16:40 2015
@@ -62,7 +62,7 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
@@ -130,12 +130,8 @@ We'll try to release DM artifacts to mav
<span class="nt"></build></span>
<span class="nt"></project></span>
</pre></div>
-
-
-<h1 id="migrating-from-version-2">Migrating from version 2</h1>
-<p>...</p>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1664717 by pderop on Fri, 6 Mar 2015 20:53:54 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/migrating-from-other-solutions.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/migrating-from-other-solutions.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/migrating-from-other-solutions.html
Tue Mar 10 21:16:40 2015
@@ -62,19 +62,19 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
<h1>Apache Felix Dependency Manager - Migrating from other solutions</h1>
- <p>TODO</p>
+ <p>Watch this space! :)</p>
<h1 id="declarative-services">Declarative Services</h1>
<h1 id="blueprint">Blueprint</h1>
<h1 id="ipojo">iPOJO</h1>
<h1 id="service-binder">Service Binder</h1>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1664040 by marrs on Wed, 4 Mar 2015 15:21:58 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/performance-tuning.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/performance-tuning.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/performance-tuning.html
Tue Mar 10 21:16:40 2015
@@ -18,7 +18,7 @@
limitations under the License.
-->
<head>
- <title>Apache Felix - Apache Felix Dependency Manager - Performance
Tuning</title>
+ <title>Apache Felix - Dependency Manager - Performance Tuning</title>
<link rel="icon" href="/res/favicon.ico">
<link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
<link rel="stylesheet" href="/res/codehilite.css" type="text/css"
media="all">
@@ -62,13 +62,13 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
- <h1>Apache Felix Dependency Manager - Performance Tuning</h1>
- <h3 id="filter-indices">Filter Indices</h3>
+ <h1>Dependency Manager - Performance Tuning</h1>
+ <h1 id="filter-indices">Filter Indices</h1>
<p>Filter indices allow you to speed up the service resolution process by
skipping the services registry, in favor of a fast index on given service
properties.</p>
<p>The Dependency Manager will look for a set of filter indices in the
<code>org.apache.felix.dependencymanager.filterindex</code> system property.
This system property uses the following syntax,</p>
<div class="codehilite"><pre><span class="n">property</span><span
class="o">-</span><span class="n">index</span> <span class="p">::=</span> <span
class="n">service</span><span class="o">-</span><span class="n">property</span>
<span class="o">|</span> <span class="n">service</span><span
class="o">-</span><span class="n">property</span> <span
class="s">','</span> <span class="n">property</span><span
class="o">-</span><span class="n">index</span>
@@ -83,9 +83,9 @@
<li><em>Aspect indices</em> work with Dependency Manager Aspect services, and
will provide indexing for the specific filters that they use.</li>
<li><em>Adapter indices</em> work like Aspect indices, but for Adapter
services.</li>
</ul>
-<h4 id="performance">Performance</h4>
+<h2 id="performance">Performance</h2>
<p>The index isn't free, but reduces the linear (and wasteful) filter-based
lookup to an indexed log(n) lookup. You can expect noticeable speedup if you
have at least several hundred services.</p>
-<h4 id="examples">Examples</h4>
+<h2 id="examples">Examples</h2>
<div class="codehilite"><pre><span class="o">-</span><span
class="n">Dorg</span><span class="p">.</span><span class="n">apache</span><span
class="p">.</span><span class="n">felix</span><span class="p">.</span><span
class="n">dependencymanager</span><span class="p">.</span><span
class="n">filterindex</span><span class="p">=</span><span
class="n">objectClass</span>
</pre></div>
@@ -107,7 +107,7 @@
<p>Provides indexing for all Aspect services.</p>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1664040 by marrs on Wed, 4 Mar 2015 15:21:58 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/resources.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/resources.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/resources.html
Tue Mar 10 21:16:40 2015
@@ -18,7 +18,7 @@
limitations under the License.
-->
<head>
- <title>Apache Felix - Resource adapters</title>
+ <title>Apache Felix - Dependency Manager - Resource adapters</title>
<link rel="icon" href="/res/favicon.ico">
<link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
<link rel="stylesheet" href="/res/codehilite.css" type="text/css"
media="all">
@@ -62,12 +62,12 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
- <h1>Resource adapters</h1>
+ <h1>Dependency Manager - Resource adapters</h1>
<p>Resource adapters are a special type of adapters which can adapt a
resource into an OSGi service. These resources can be all kinds of resources,
e.g. bundle resources, files, database records, anything as long as it can be
resolved though a URL.</p>
<p>The diagram below illustrates the classes involved in the resource adapter
pattern:</p>
<p><img src="./diagrams/resources.png" alt="Resource adapters" style="width:
780px"/></p>
@@ -153,7 +153,7 @@
<p>When a new handler is being added, the resource repository should inform
the resource handler on the resources it has that match the handler's filter or
url. This is done by invoking the <code>added(url, properties)</code> method on
the ResourceHandler. This callback results in the ResourceAdapter's
ResourceDependency being satisfied, the url being injected into the resource
adapter implementation object and the resource adapter implementation component
being started.</p>
<p>Besides the added() callback the resource repository is also responsible
for handling the changed() and removed() methods on change or removal of the
resource from the resource repository. For a bundle resource repository that's
not likely to happen, but for a filesystem resource repository this can very
well be the case.</p>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1665660 by uiterlix on Tue, 10 Mar 2015 19:34:29 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew.html
Tue Mar 10 21:16:40 2015
@@ -18,7 +18,7 @@
limitations under the License.
-->
<head>
- <title>Apache Felix - Apache Felix Dependency Manager - What's new in
version 4?</title>
+ <title>Apache Felix - Dependency Manager - What's new in version
4?</title>
<link rel="icon" href="/res/favicon.ico">
<link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
<link rel="stylesheet" href="/res/codehilite.css" type="text/css"
media="all">
@@ -62,13 +62,13 @@
<div class="main">
<div class="breadcrump" style="font-size: 80%;">
- <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Apache
Felix Dependency Manager 4</a>
+ <a href="/">Home</a> » <a
href="/documentation.html">Documentation</a> » <a
href="/documentation/subprojects.html">Apache Felix Subproject
Documentation</a> » <a
href="/documentation/subprojects/apache-felix-dependency-manager.html">Dependency
Manager 4</a>
</div>
- <h1>Apache Felix Dependency Manager - What's new in version 4?</h1>
- <h2 id="new-thread-model">New thread model</h2>
+ <h1>Dependency Manager - What's new in version 4?</h1>
+ <h1 id="new-thread-model">New thread model</h1>
<p>DependencyManager 4.0 has been significantly reworked to improve support
for concurrency. The following principles form the basis of the new concurrency
model in DM4.</p>
<ul>
<li>All external events that influence the state of dependencies are recorded
and given to the serial executor of the component. We record whatever data
comes in, so when the actual job is run by the serial executor, we still have
access to the original data without having to access other sources whose state
might have changed since.</li>
@@ -88,7 +88,7 @@
<p>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).</p>
<p>You will find a full description of the new thread model in the <a
href="../reference/thread-model.html">Reference</a> section.</p>
-<h2 id="new-features">New features</h2>
+<h1 id="new-features">New features</h1>
<p>In addition, some new features have been implemented in dependency
manager:</p>
<ul>
<li>
@@ -125,13 +125,13 @@ Use "add-require-capability=true" option
See this <a
href="https://svn.apache.org/repos/asf/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAndParameterFactory.java">example</a>
from the samples in the source distribution.</p>
</li>
</ul>
-<h2 id="sample-codes">Sample codes</h2>
+<h1 id="sample-code">Sample code</h1>
<p>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
<em>http://localhost:8080/system/console/configMgr</em> URL.
Please consult org.apache.felix.dependencymanager.samples/README.samples for
up to date instructions on how to execute the various examples.</p>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1665491 by pderop on Tue, 10 Mar 2015 12:05:33 +0000
+ Rev. 1665701 by marrs on Tue, 10 Mar 2015 21:16:26 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project