You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by bu...@apache.org on 2013/09/22 21:55:45 UTC

svn commit: r879470 - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/apache-felix-dependency-manager/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.html

Author: buildbot
Date: Sun Sep 22 19:55:44 2013
New Revision: 879470

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/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.html

Propchange: websites/staging/felix/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Sep 22 19:55:44 2013
@@ -1 +1 @@
-1525418
+1525421

Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.html (original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.html Sun Sep 22 19:55:44 2013
@@ -90,13 +90,10 @@ DM Runtime bundle (org.apache.felix.dm.r
 <h2 id="lifecycle-callbacks">Lifecycle callbacks</h2>
 <h3 id="component-activation">Component Activation</h3>
 <p>Activating a component consists of the following steps:</p>
+<p>1) Wait for all required dependencies to be available. When all required dependencies are 
+available:</p>
 <ul>
-<li>
-<p>Wait for all required dependencies to be available. When all required dependencies are available:</p>
-</li>
-<li>
-<p>Instantiate the component.</p>
-</li>
+<li>Instantiate the component.</li>
 <li>Inject all required dependencies (on class fields using reflection, or by invoking 
 callback methods).</li>
 <li>Inject all optional dependencies defined on class fields, possibly with a <em>NullObject</em> if the dependency is not available.</li>
@@ -104,26 +101,20 @@ callback methods).</li>
 yet allowed to add some additional dependencies  (but using the API). 
 Alternatively, you can also configure some  dependencies dynamically 
 (explained later, in <a href="#dynamic-dependency-configuration">#Dynamic Dependency Configuration</a>.</li>
-<li>Wait for extra dependencies optionally configured from the init() method.</li>
-<li>
-<p>If the component is not using the @<em>LifecycleController</em> annotation (detailed in the 
+</ul>
+<p>2) Wait for extra dependencies optionally configured from the init() method.</p>
+<p>3) If the component is not using the @<em>LifecycleController</em> annotation (detailed in the 
 <a href="#controlling-the-lifecycle.path">#Controlling the Lifecycle</a> section), then:</p>
-</li>
-<li>
-<p>Invoke the component start method (annotated with <em>@Start</em>).</p>
-</li>
+<ul>
+<li>Invoke the component start method (annotated with <em>@Start</em>).</li>
 <li>Publish some OSGi services (if the component provides some services).</li>
-<li>
-<p>Start tracking optional dependencies applied on method callbacks (useful for the whiteboard pattern). <em>Notice that NullObject pattern is not applied to optional callback dependencies</em>. In other words, if the dependency is not there, your callback won't be invoked at all. If you need the NullObject pattern, then apply optional dependencies on class fields, not on callback methods.</p>
-</li>
-<li>
-<p>Else do nothing because the component will trigger itself the startup using the lifecycle controller.</p>
-</li>
+<li>Start tracking optional dependencies applied on method callbacks (useful for the whiteboard pattern). <em>Notice that NullObject pattern is not applied to optional callback dependencies</em>. In other words, if the dependency is not there, your callback won't be invoked at all. If you need the NullObject pattern, then apply optional dependencies on class fields, not on callback methods.</li>
 </ul>
+<p>4) Else do nothing because the component will trigger itself the startup using the lifecycle controller.</p>
 <h3 id="component-deactivation">Component Deactivation</h3>
 <p>Deactivating a component consists of the following steps:</p>
+<p>If the bundle is stopped or if some required dependencies are unavailable, or if the component is deactivated by a factorySet, then:</p>
 <ul>
-<li>If the bundle is stopped or if some required dependencies are unavailable, or if the component is deactivated by a factorySet, then:</li>
 <li>Unbind optional dependencies (defined on callback methods). Notice that any optional dependency unavailability does not trigger the component deactivation:&nbsp; the <em>removed</em> callbacks are just invoked, if declared in the annotation.</li>
 <li>Invoke the stop method (annotated wit <em>@Stop</em>),  and unregister some OSGi services (if the components provides some services).</li>
 <li>invoke destroy method (annotated with <em>@Destroy</em>).</li>
@@ -309,7 +300,7 @@ following:</p>
 <p>Notice that properties returned by the Map take precedence over other properties, and may 
 override some of them.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1525418 by pderop on Sun, 22 Sep 2013 19:52:06 +0000
+        Rev. 1525421 by pderop on Sun, 22 Sep 2013 19:55:37 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project