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/02/06 17:25:57 UTC

svn commit: r849586 [1/2] - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/

Author: buildbot
Date: Wed Feb  6 16:25:57 2013
New Revision: 849586

Log:
Staging update by buildbot for felix

Modified:
    websites/staging/felix/trunk/content/   (props changed)
    websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/ipojo-hello-word-maven-based-tutorial.html
    websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/ipojo-in-10-minutes.html

Propchange: websites/staging/felix/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Feb  6 16:25:57 2013
@@ -1 +1 @@
-1443043
+1443044

Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/ipojo-hello-word-maven-based-tutorial.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/ipojo-hello-word-maven-based-tutorial.html (original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/ipojo-hello-word-maven-based-tutorial.html Wed Feb  6 16:25:57 2013
@@ -164,84 +164,80 @@
 <p>The following is a simple example illustrating how to use the core iPOJO concepts. The example is comprised of two components, one providing a <em>Hello</em> service and one requiring any number of <em>Hello</em> services. The components are packaged into three different bundles using Maven. The <em>hello.service</em> bundle contains the service interface. The <em>hello.impl</em> bundle contains a component implementing the service. The <em>hello.client</em> bundle contains the consumer component.</p>
 <p>Download the tutorial archive <a href="http://people.apache.org/~clement/ipojo/tutorials/maven/tutorial.zip">here</a>. This archive contains a version of Felix (configured with iPOJO), and the projects explained below.</p>
 <h3 id="preparing-maven-installing-the-tutorial">Preparing Maven &amp; Installing the tutorial</h3>
-<p>The first step is to download and install Maven; the example was created using Maven 2.1+. Once maven is installed on your machine, you can compile the tutorial by unzipping the archive, and by launching the '<em>mvn clean install</em>' command at the root of tutorial.</p>
+<p>The first step is to download and install Maven; the example was created using Maven 2.1+. Once maven is installed on your machine, you can compile the tutorial by unzipping the archive, and by launching the <code>mvn clean install</code> command at the root of tutorial.</p>
 <p><em>Be aware that Maven outputs a lot of information while it executes and often downloads a lot of required JAR files into its local repository.</em></p>
 <h3 id="hello-service">Hello Service</h3>
-<p>The first project is the <em>hello.service</em> project. This project contains only the <em>hello</em> service interface. Look at the <code>src/main/java/ipojo/example/hello/Hello.java</code> file.
-{code:java}
-/*<em>
- * Hello Interface.
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- </em>/
-public interface Hello {</p>
-<div class="codehilite"><pre><span class="o">/**</span>
- <span class="o">*</span> <span class="n">Returns</span> <span class="n">a</span> <span class="n">message</span> <span class="n">like:</span> <span class="s">&quot;Hello $user_name&quot;</span><span class="o">.</span>
- <span class="o">*</span> <span class="nv">@param</span> <span class="n">name</span> <span class="n">the</span> <span class="n">name</span>
- <span class="o">*</span> <span class="nv">@return</span> <span class="n">the</span> <span class="n">hello</span> <span class="n">message</span>
- <span class="o">*/</span>
-<span class="n">String</span> <span class="n">sayHello</span><span class="p">(</span><span class="n">String</span> <span class="n">name</span><span class="p">);</span>
-</pre></div>
-
-
-<p>}</p>
-<div class="codehilite"><pre>In the project directory, the pom.xml file contains the instructions to build the bundle. The bundle uses the _maven-bundle-plugin_ (see here for more information on this plug-in).
-{div:class=pom}
-<span class="nt">&lt;project&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;modelVersion&gt;</span>4.0.0<span class="nt">&lt;/modelVersion&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;packaging&gt;</span>bundle<span class="nt">&lt;/packaging&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> {color:#ff0000}<span class="nt">&lt;groupId&gt;</span>ipojo.example<span class="nt">&lt;/groupId&gt;</span>{color}
-{color:#ff0000}<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;artifactId&gt;</span>hello.service<span class="nt">&lt;/artifactId&gt;</span>{color}
-{color:#ff0000}<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;version&gt;</span>1.0.0<span class="nt">&lt;/version&gt;</span>{color}
-{color:#ff0000}<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;name&gt;</span>Hello Service<span class="nt">&lt;/name&gt;</span>{color}
-
-<span class="nt">&lt;build&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;plugins&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;plugin&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;groupId&gt;</span>org.apache.felix<span class="nt">&lt;/groupId&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;artifactId&gt;</span>maven-bundle-plugin<span class="nt">&lt;/artifactId&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;version&gt;</span>2.0.1<span class="nt">&lt;/version&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;extensions&gt;</span>true<span class="nt">&lt;/extensions&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;configuration&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;instructions&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;Bundle-SymbolicName&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> $\{pom.artifactId}
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;/Bundle-SymbolicName&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> {color:#ff0000}<span class="nt">&lt;Export-Package&gt;</span>{color}
-{color:#ff0000}<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> ipojo.example.hello{color}
-{color:#ff0000}<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;/Export-Package&gt;</span>{color}
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;/instructions&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;/configuration&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;/plugin&gt;</span>
-<span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span> <span class="nt">&lt;/plugins&gt;</span>
-<span class="nt">&lt;/build&gt;</span>
-
-<span class="nt">&lt;/project&gt;</span>
-{div}
-Then, the project is ready to be built issuing the following Maven command inside the project directory:
-</pre></div>
-
-
-<p>mvn clean install</p>
-<div class="codehilite"><pre>Maven should report that the build was a success; if an error was reported then verify the previous steps. Upon success the _Hello_ service component JAR file is installed into the local Maven repository. A copy of the bundle JAR file will also be present in the &quot;target&quot; directory inside the project directory.
-
-h3. Hello Service Provider
-
-The component implementation of the service is a simple Java class implementing the _Hello_ service interface. The implementation is in the _hello.impl_ project. The file  contains the following service implementation:
-{code:java}
-/**
- * Component implementing the Hello service.
- * @author <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">&quot;mailto:dev@felix.apache.org&quot;</span><span class="nt">&gt;</span>Felix Project Team<span class="nt">&lt;/a&gt;</span>
- */
-public class HelloImpl implements Hello {
-
-    /**
-     * Returns an &#39;Hello&#39; message.
-     * @param name : name
-     * @return Hello message
-     * @see ipojo.example.hello.Hello#sayHello(java.lang.String)
-     */
-    public String sayHello(String name) { return &quot;hello &quot; + name;  }
-}
+<p>The first project is the <em>hello.service</em> project. This project contains only the <em>hello</em> service interface. Look at the <code>src/main/java/ipojo/example/hello/Hello.java</code> file:</p>
+<div class="codehilite"><pre><span class="cm">/**</span>
+<span class="cm"> * Hello Interface.</span>
+<span class="cm"> * @author &lt;a href=&quot;mailto:dev@felix.apache.org&quot;&gt;Felix Project Team&lt;/a&gt;</span>
+<span class="cm"> */</span>
+<span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Hello</span> <span class="o">{</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * Returns a message like: &quot;Hello $user_name&quot;.</span>
+<span class="cm">     * @param name the name</span>
+<span class="cm">     * @return the hello message</span>
+<span class="cm">     */</span>
+    <span class="n">String</span> <span class="nf">sayHello</span><span class="o">(</span><span class="n">String</span> <span class="n">name</span><span class="o">);</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>In the project directory, the pom.xml file contains the instructions to build the bundle. The bundle uses the <em>maven-bundle-plugin</em> (see here for more information on this plug-in).</p>
+<div class="pom"><p>&lt;project&gt;<br>
+&nbsp;&nbsp;&nbsp; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br>
+&nbsp;&nbsp;&nbsp; &lt;packaging&gt;bundle&lt;/packaging&gt;<br>
+&nbsp;&nbsp;&nbsp; <font color="#ff0000">&lt;groupId&gt;ipojo.example&lt;/groupId&gt;</font><br>
+<font color="#ff0000">&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;hello.service&lt;/artifactId&gt;</font><br>
+<font color="#ff0000">&nbsp;&nbsp;&nbsp; &lt;version&gt;1.0.0&lt;/version&gt;</font><br>
+<font color="#ff0000">&nbsp;&nbsp;&nbsp; &lt;name&gt;Hello Service&lt;/name&gt;</font></p>
+
+<p>&lt;build&gt;<br>
+&nbsp;&nbsp;&nbsp; &lt;plugins&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;plugin&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;version&gt;2.0.1&lt;/version&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;extensions&gt;true&lt;/extensions&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;configuration&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;instructions&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Bundle-SymbolicName&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ${pom.artifactId}<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/Bundle-SymbolicName&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <font color="#ff0000">&lt;Export-Package&gt;</font><br>
+<font color="#ff0000">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ipojo.example.hello</font><br>
+<font color="#ff0000">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/Export-Package&gt;</font><br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/instructions&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/configuration&gt;<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/plugin&gt;<br>
+&nbsp;&nbsp;&nbsp; &lt;/plugins&gt;<br>
+&lt;/build&gt;</p>
+
+<p>&lt;/project&gt;</p></div>
+
+<p>Then, the project is ready to be built issuing the following Maven command inside the project directory:</p>
+<div class="codehilite"><pre>mvn clean install
+</pre></div>
+
+
+<p>Maven should report that the build was a success; if an error was reported then verify the previous steps. Upon success the <em>Hello</em> service component JAR file is installed into the local Maven repository. A copy of the bundle JAR file will also be present in the "target" directory inside the project directory.</p>
+<h3 id="hello-service-provider">Hello Service Provider</h3>
+<p>The component implementation of the service is a simple Java class implementing the <em>Hello</em> service interface. The implementation is in the <em>hello.impl</em> project. The file <code>src/main/java/ipojo/example/hello/impl/HelloImpl.java</code> contains the following service implementation:</p>
+<div class="codehilite"><pre><span class="cm">/**</span>
+<span class="cm"> * Component implementing the Hello service.</span>
+<span class="cm"> * @author &lt;a href=&quot;mailto:dev@felix.apache.org&quot;&gt;Felix Project Team&lt;/a&gt;</span>
+<span class="cm"> */</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">HelloImpl</span> <span class="kd">implements</span> <span class="n">Hello</span> <span class="o">{</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * Returns an &#39;Hello&#39; message.</span>
+<span class="cm">     * @param name : name</span>
+<span class="cm">     * @return Hello message</span>
+<span class="cm">     * @see ipojo.example.hello.Hello#sayHello(java.lang.String)</span>
+<span class="cm">     */</span>
+    <span class="kd">public</span> <span class="n">String</span> <span class="nf">sayHello</span><span class="o">(</span><span class="n">String</span> <span class="n">name</span><span class="o">)</span> <span class="o">{</span> <span class="k">return</span> <span class="s">&quot;hello &quot;</span> <span class="o">+</span> <span class="n">name</span><span class="o">;</span>  <span class="o">}</span>
+<span class="o">}</span>
 </pre></div>
 
 
@@ -263,277 +259,282 @@ public class HelloImpl implements Hello 
 
 
 <p>In the above XML-based metadata, the <em>component</em> element has a mandatory '<em>classname'</em>attribute. This attribute tells iPOJO the implementation class of the component. Since the component in this example provides a service, the component element also specifies a child '<em>provides</em>' element. The '<em>provides</em>' element informs iPOJO that it must manage the publishing of a service. When the '<em>provides</em>' element does not contain an interface attribute, as is the case in this example, iPOJO will expose all implemented interfaces of the component as a service; it is also possible to specify the precise service interface. The '<em>instance</em>' element asks iPOJO to create an instance of your component when the bundle is started.</p>
-<p>Finally, the "pom.xml" file contains instructions to build the bundle:
-{div:class=pom}
-<project>
-&nbsp;&nbsp;<modelVersion>4.0.0</modelVersion>
-&nbsp; <packaging>bundle</packaging>
-&nbsp;&nbsp;{color:red}<groupId>ipojo.example</groupId>{color}
-{color:red}&nbsp;&nbsp;<artifactId>hello.impl</artifactId>{color}
-{color:red}&nbsp;&nbsp;<version>1.0.0</version>{color}</p>
-<p>&nbsp;&nbsp;{color:red}<name>Hello Service Provider</name>{color}</p>
-<p>{color:red}&nbsp; <dependencies>{color}
-{color:red}&nbsp;&nbsp; &nbsp;<dependency> <!--Compilation (i.e. class) dependency on the service interface -->{color}
-{color:red}&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<groupId>ipojo.example</groupId>{color}
-{color:red}&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<artifactId>hello.service</artifactId>{color}
-{color:red}&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<version>{color}{color:#ff0000}1.0.0{color}{color:red}</version>{color}
-{color:red}&nbsp;&nbsp; &nbsp;</dependency>{color}
-{color:red}&nbsp; </dependencies>{color}</p>
-<p>&nbsp;&nbsp;<build>
-&nbsp;&nbsp; <plugins>
-&nbsp;&nbsp;&nbsp;&nbsp; <plugin>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>org.apache.felix</groupId>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>maven-bundle-plugin</artifactId>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>2.0.1</version>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <extensions>true</extensions>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <configuration>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <instructions>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {color:red}<Private-Package>ipojo.example.hello.impl</Private-Package>{color}
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </instructions>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </configuration>
-&nbsp;&nbsp;&nbsp;&nbsp; </plugin>
-&nbsp;&nbsp;&nbsp;&nbsp; <plugin>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>org.apache.felix</groupId>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>maven-ipojo-plugin</artifactId>
-&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <version>1.6.0</version>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<executions>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <execution>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <goals>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <goal>ipojo-bundle</goal>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </goals>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</execution>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </executions>
-&nbsp;&nbsp;&nbsp;&nbsp; </plugin>
-&nbsp;&nbsp; </plugins>
-&nbsp;</build>
-</project>
-{div}
-The text highlighted in {color:red}{<em>}red{</em>}{color} above indicates the important information related to the project. The first part of the POM file indicates that the packaging format is an iPOJO bundle and also includes some information about the project (name, groupId, and artifactId). This information is not used by iPOJO, but is used by Maven. The rest of the POM file contains the bundle configuration. In the <em>instructions</em> element, you need to enter the bundle name, the bundle description, and the exported packages. The service provider bundle exports the package of <em>Hello</em> interface.</p>
+<p>Finally, the <code>pom.xml</code> file contains instructions to build the bundle:</p>
+<div class="pom"><p>&lt;project&gt;<br>
+&nbsp;&nbsp;&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br>
+&nbsp; &lt;packaging&gt;bundle&lt;/packaging&gt;<br>
+&nbsp;&nbsp;<font color="red">&lt;groupId&gt;ipojo.example&lt;/groupId&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&lt;artifactId&gt;hello.impl&lt;/artifactId&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&lt;version&gt;1.0.0&lt;/version&gt;</font></p>
+
+<p>&nbsp;&nbsp;<font color="red">&lt;name&gt;Hello Service Provider&lt;/name&gt;</font></p>
+
+<p><font color="red">&nbsp; &lt;dependencies&gt;</font><br>
+<font color="red">&nbsp;&nbsp; &nbsp;&lt;dependency&gt; &lt;!--Compilation (i.e. class) dependency on the service interface --&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;groupId&gt;ipojo.example&lt;/groupId&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;artifactId&gt;hello.service&lt;/artifactId&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;version&gt;</font><font color="#ff0000">1.0.0</font><font color="red">&lt;/version&gt;</font><br>
+<font color="red">&nbsp;&nbsp; &nbsp;&lt;/dependency&gt;</font><br>
+<font color="red">&nbsp; &lt;/dependencies&gt;</font></p>
+
+<p>&nbsp;&nbsp;&lt;build&gt;<br>
+&nbsp;&nbsp; &lt;plugins&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;plugin&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;version&gt;2.0.1&lt;/version&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;extensions&gt;true&lt;/extensions&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;configuration&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;instructions&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Bundle-SymbolicName&gt;${pom.artifactId}&lt;/Bundle-SymbolicName&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="red">&lt;Private-Package&gt;ipojo.example.hello.impl&lt;/Private-Package&gt;</font><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/instructions&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/configuration&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;/plugin&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;plugin&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;maven-ipojo-plugin&lt;/artifactId&gt;<br>
+&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &lt;version&gt;1.6.0&lt;/version&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;executions&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;execution&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;goals&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;goal&gt;ipojo-bundle&lt;/goal&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/goals&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;/execution&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/executions&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;/plugin&gt;<br>
+&nbsp;&nbsp; &lt;/plugins&gt;<br>
+&nbsp;&lt;/build&gt;<br>
+&lt;/project&gt;</p></div>
+
+<p>The text highlighted in <span style="color:red">red</span> above indicates the important information related to the project. The first part of the POM file indicates that the packaging format is an iPOJO bundle and also includes some information about the project (name, groupId, and artifactId). This information is not used by iPOJO, but is used by Maven. The rest of the POM file contains the bundle configuration. In the <em>instructions</em> element, you need to enter the bundle name, the bundle description, and the exported packages. The service provider bundle exports the package of <em>Hello</em> interface.</p>
 <p>Then, the project is ready to be built issuing the following Maven command inside the project directory:</p>
-<div class="codehilite"><pre><span class="n">mvn</span> <span class="n">clean</span> <span class="n">install</span>
+<div class="codehilite"><pre>mvn clean install
 </pre></div>
 
 
 <p>Maven should report that the build was a success; if an error was reported then verify the previous steps. Upon success the <em>Hello</em> service component JAR file is installed into the local Maven repository. A copy of the bundle JAR file will also be present in the "target" directory inside the project directory.</p>
 <h3 id="hello-service-client">Hello Service Client</h3>
-<p>The Hello service consumer is inside the <em>hello.client</em> project. The file <code>src/main/java/ipojo/example/hello/client/HelloClient.java</code> contains the following <em>Hello</em> service client:
-{code:java}
-package ipojo.example.hello.client;</p>
-<p>import ipojo.example.hello.Hello;</p>
-<p>/*<em>
- * Hello Service simple client.
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- </em>/
-public class HelloClient implements Runnable {</p>
-<div class="codehilite"><pre><span class="o">/**</span>
- <span class="o">*</span>  <span class="n">Delay</span> <span class="n">between</span> <span class="n">two</span> <span class="n">invocations</span><span class="o">.</span>
- <span class="o">*/</span>
-<span class="n">private</span> <span class="n">static</span> <span class="n">final</span> <span class="nb">int</span> <span class="n">DELAY</span> <span class="o">=</span> <span class="mi">10000</span><span class="p">;</span>
-
-<span class="o">/**</span>
- <span class="o">*</span> <span class="n">Hello</span> <span class="n">services</span><span class="o">.</span>
- <span class="o">*</span> <span class="n">Injected</span> <span class="n">by</span> <span class="n">the</span> <span class="n">container</span><span class="o">.</span>
- <span class="o">*</span> <span class="o">*/</span>
-<span class="n">private</span> <span class="n">Hello</span><span class="o">[]</span><span class="p">()</span> <span class="n">m_hello</span><span class="p">;</span>
-
-<span class="o">/**</span>
- <span class="o">*</span> <span class="n">End</span> <span class="n">flag</span><span class="o">.</span>
- <span class="o">*</span>  <span class="o">*/</span>
-<span class="n">private</span> <span class="n">boolean</span> <span class="n">m_end</span><span class="p">;</span>
-
-<span class="o">/**</span>
- <span class="o">*</span> <span class="n">Run</span> <span class="n">method</span><span class="o">.</span>
- <span class="o">*</span> <span class="nv">@see</span> <span class="n">java</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">Runnable</span><span class="c1">#run()</span>
- <span class="o">*/</span>
-<span class="n">public</span> <span class="n">void</span> <span class="n">run</span><span class="p">()</span> <span class="p">{</span>
-    <span class="k">while</span> <span class="p">(</span><span class="o">!</span><span class="n">m_end</span><span class="p">)</span> <span class="p">{</span>
-        <span class="n">try</span> <span class="p">{</span>
-            <span class="n">invokeHelloServices</span><span class="p">();</span>
-            <span class="n">Thread</span><span class="o">.</span><span class="nb">sleep</span><span class="p">(</span><span class="n">DELAY</span><span class="p">);</span>
-        <span class="p">}</span> <span class="n">catch</span> <span class="p">(</span><span class="n">InterruptedException</span> <span class="n">ie</span><span class="p">)</span> <span class="p">{</span>
-            <span class="sr">/* will recheck end */</span>
-        <span class="p">}</span>
-    <span class="p">}</span>
-<span class="p">}</span>
-
-<span class="o">/**</span>
- <span class="o">*</span> <span class="n">Invoke</span> <span class="n">hello</span> <span class="n">services</span><span class="o">.</span>
- <span class="o">*/</span>
-<span class="n">public</span> <span class="n">void</span> <span class="n">invokeHelloServices</span><span class="p">()</span> <span class="p">{</span>
-    <span class="k">for</span> <span class="p">(</span><span class="nb">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">m_hello</span><span class="o">.</span><span class="nb">length</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
-        <span class="sr">//</span> <span class="n">Update</span> <span class="n">with</span> <span class="n">your</span> <span class="n">name</span><span class="o">.</span>
-        <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="n">m_hello</span><span class="p">[</span><span class="n">i</span><span class="p">]()</span><span class="o">.</span><span class="n">sayHello</span><span class="p">(</span><span class="s">&quot;world&quot;</span><span class="p">));</span>
-    <span class="p">}</span>
-<span class="p">}</span>
-
-<span class="o">/**</span>
- <span class="o">*</span> <span class="n">Starting</span><span class="o">.</span>
- <span class="o">*/</span>
-<span class="n">public</span> <span class="n">void</span> <span class="n">starting</span><span class="p">()</span> <span class="p">{</span>
-    <span class="n">Thread</span> <span class="n">thread</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Thread</span><span class="p">(</span><span class="n">this</span><span class="p">);</span>
-    <span class="n">m_end</span> <span class="o">=</span> <span class="n">false</span><span class="p">;</span>
-    <span class="n">thread</span><span class="o">.</span><span class="n">start</span><span class="p">();</span>
-<span class="p">}</span>
-
-<span class="o">/**</span>
- <span class="o">*</span> <span class="n">Stopping</span><span class="o">.</span>
- <span class="o">*/</span>
-<span class="n">public</span> <span class="n">void</span> <span class="n">stopping</span><span class="p">()</span> <span class="p">{</span>
-    <span class="n">m_end</span> <span class="o">=</span> <span class="n">true</span><span class="p">;</span>
-<span class="p">}</span>
-</pre></div>
-
-
-<p>}</p>
-<div class="codehilite"><pre><span class="n">The</span> <span class="n">_Hello_</span> <span class="n">service</span> <span class="n">client</span> <span class="n">creates</span> <span class="n">a</span> <span class="n">thread</span> <span class="n">that</span> <span class="n">periodically</span> <span class="n">invokes</span> <span class="n">the</span> <span class="n">available</span> <span class="n">_Hello_</span> <span class="n">services</span><span class="o">.</span> <span class="n">The</span> <span class="n">thread</span> <span class="n">starts</span> <span class="n">when</span> <span class="n">at</span> <span class="n">least</span> <span class="n">one</span> <span class="n">_Hello_</span> <span class="n">service</span> <span class="n">provider</span> <span class="n">is</span> <span class="n">present</span> <span class="n">using</span> <span class="n">iPOJO</span><span class="s">&#39;s call back mechanism. In the client code, to use the _hello_ the component implementat
 ion simply declares a field of the type of the service and then simply uses it directly in its code. In this example, it is the m_hello field is declared as the service field; notice that the field is an array of _Hello_. In iPOJO an array of services represents an aggregate or multiple cardinality dependency, whereas if a scalar value represents a singular or unary cardinality dependency. In other words, for a singular dependency simply remove the array brackets from the example (e.g., HelloService m_hello\[\]. After declaring a field for the service, the rest of the component code can simply assume that the service field will be initialized, e.g., m_hello\[i\].sayHello(&quot;world&quot;).</span>
-
-<span class="s">Notice that iPOJO manages service synchronization too. So, the service invocations do not require synchronization blocks. This synchronization is maintained on a per thread basis, where each method that accesses a service is instrumented to attach the given service instance to the thread so that the thread will continue to see the same service instances even across nested method invocations. The thread will not see different service instances until it completely exits from the first method it entered which used a services. Thus, you would not want to access services in the  method above, because the thread would always see the same service instance.</span>
-
-<span class="s">The component provides two callback methods for its activation and deactivation, starting() and stopping(), respectively. Callbacks are used when the component needs to be informed about a component state change. In iPOJO, the component state is either *INVALID* (i.e., not all of the component&#39;</span><span class="n">s</span> <span class="n">constraints</span> <span class="n">are</span> <span class="n">satisfied</span><span class="p">)</span> <span class="ow">or</span> <span class="o">*</span><span class="n">VALID</span><span class="o">*</span> <span class="p">(</span><span class="n">i</span><span class="o">.</span><span class="n">e</span><span class="o">.</span><span class="p">,</span> <span class="n">all</span> <span class="n">of</span> <span class="n">the</span> <span class="n">component</span><span class="s">&#39;s constraints are satisfied). In this example, the starting callback method creates and starts a thread; the stopping callback method stops t
 he thread. The component metadata will instruct iPOJO to invoke these methods when the component&#39;</span><span class="n">s</span> <span class="n">state</span> <span class="n">changes</span> <span class="n">to</span> <span class="o">*</span><span class="n">VALID</span><span class="o">*</span> <span class="ow">or</span> <span class="o">*</span><span class="n">INVALID</span><span class="o">*</span> <span class="n">respectively</span><span class="o">.</span>
-
-<span class="n">The</span> <span class="n">iPOJO</span> <span class="n">metadata</span> <span class="n">file</span> <span class="n">describing</span> <span class="n">the</span> <span class="n">component</span> <span class="n">is</span> <span class="s">&quot;metadata.xml&quot;</span> <span class="ow">and</span> <span class="n">contains</span> <span class="n">the</span> <span class="n">following</span> <span class="n">metadata:</span>
-<span class="p">{</span><span class="n">code:xml</span><span class="p">}</span>
-<span class="o">&lt;</span><span class="p">?</span><span class="n">xml</span> <span class="n">version</span><span class="o">=</span><span class="s">&quot;1.0&quot;</span> <span class="n">encoding</span><span class="o">=</span><span class="s">&quot;UTF-8&quot;</span><span class="p">?</span><span class="o">&gt;</span>
-<span class="o">&lt;</span><span class="n">ipojo</span> 
-    <span class="n">xmlns:xsi</span><span class="o">=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
-    <span class="n">xsi:schemaLocation</span><span class="o">=</span><span class="s">&quot;org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/CURRENT/core.xsd&quot;</span> 
-    <span class="n">xmlns</span><span class="o">=</span><span class="s">&quot;org.apache.felix.ipojo&quot;</span><span class="o">&gt;</span>
-
-  <span class="o">&lt;</span><span class="n">component</span> <span class="n">classname</span><span class="o">=</span><span class="s">&quot;ipojo.example.hello.client.HelloClient&quot;</span><span class="o">&gt;</span>
-    <span class="o">&lt;</span><span class="n">requires</span> <span class="n">field</span><span class="o">=</span><span class="s">&quot;m_hello&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">callback</span> <span class="n">transition</span><span class="o">=</span><span class="s">&quot;validate&quot;</span> <span class="n">method</span><span class="o">=</span><span class="s">&quot;starting&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">callback</span> <span class="n">transition</span><span class="o">=</span><span class="s">&quot;invalidate&quot;</span> <span class="n">method</span><span class="o">=</span><span class="s">&quot;stopping&quot;</span> <span class="o">/&gt;</span>
-    <span class="sr">&lt;properties&gt;</span>
-      <span class="o">&lt;</span><span class="n">property</span> <span class="n">field</span><span class="o">=</span><span class="s">&quot;m_name&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;hello.name&quot;</span> <span class="o">/&gt;</span>
-    <span class="sr">&lt;/properties&gt;</span>
-  <span class="sr">&lt;/component&gt;</span>
-
-  <span class="o">&lt;</span><span class="n">instance</span> <span class="n">component</span><span class="o">=</span><span class="s">&quot;ipojo.example.hello.client.HelloClient&quot;</span><span class="o">&gt;</span>
-    <span class="o">&lt;</span><span class="n">property</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;hello.name&quot;</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;clement&quot;</span> <span class="o">/&gt;</span>
-  <span class="sr">&lt;/instance&gt;</span>
-<span class="sr">&lt;/ipojo&gt;</span>
+<p>The Hello service consumer is inside the <em>hello.client</em> project. The file <code>src/main/java/ipojo/example/hello/client/HelloClient.java</code> contains the following <em>Hello</em> service client:</p>
+<div class="codehilite"><pre><span class="kn">package</span> <span class="n">ipojo</span><span class="o">.</span><span class="na">example</span><span class="o">.</span><span class="na">hello</span><span class="o">.</span><span class="na">client</span><span class="o">;</span>
+
+<span class="kn">import</span> <span class="nn">ipojo.example.hello.Hello</span><span class="o">;</span>
+
+<span class="cm">/**</span>
+<span class="cm"> * Hello Service simple client.</span>
+<span class="cm"> * @author &lt;a href=&quot;mailto:dev@felix.apache.org&quot;&gt;Felix Project Team&lt;/a&gt;</span>
+<span class="cm"> */</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">HelloClient</span> <span class="kd">implements</span> <span class="n">Runnable</span> <span class="o">{</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     *  Delay between two invocations.</span>
+<span class="cm">     */</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="kt">int</span> <span class="n">DELAY</span> <span class="o">=</span> <span class="mi">10000</span><span class="o">;</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * Hello services.</span>
+<span class="cm">     * Injected by the container.</span>
+<span class="cm">     * */</span>
+    <span class="kd">private</span> <span class="n">Hello</span><span class="o">[]()</span> <span class="n">m_hello</span><span class="o">;</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * End flag.</span>
+<span class="cm">     *  */</span>
+    <span class="kd">private</span> <span class="kt">boolean</span> <span class="n">m_end</span><span class="o">;</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * Run method.</span>
+<span class="cm">     * @see java.lang.Runnable#run()</span>
+<span class="cm">     */</span>
+    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">run</span><span class="o">()</span> <span class="o">{</span>
+        <span class="k">while</span> <span class="o">(!</span><span class="n">m_end</span><span class="o">)</span> <span class="o">{</span>
+            <span class="k">try</span> <span class="o">{</span>
+                <span class="n">invokeHelloServices</span><span class="o">();</span>
+                <span class="n">Thread</span><span class="o">.</span><span class="na">sleep</span><span class="o">(</span><span class="n">DELAY</span><span class="o">);</span>
+            <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">InterruptedException</span> <span class="n">ie</span><span class="o">)</span> <span class="o">{</span>
+                <span class="cm">/* will recheck end */</span>
+            <span class="o">}</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * Invoke hello services.</span>
+<span class="cm">     */</span>
+    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">invokeHelloServices</span><span class="o">()</span> <span class="o">{</span>
+        <span class="k">for</span> <span class="o">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">m_hello</span><span class="o">.</span><span class="na">length</span><span class="o">;</span> <span class="n">i</span><span class="o">++)</span> <span class="o">{</span>
+            <span class="c1">// Update with your name.</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">m_hello</span><span class="o">[</span><span class="n">i</span><span class="o">]().</span><span class="na">sayHello</span><span class="o">(</span><span class="s">&quot;world&quot;</span><span class="o">));</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * Starting.</span>
+<span class="cm">     */</span>
+    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">starting</span><span class="o">()</span> <span class="o">{</span>
+        <span class="n">Thread</span> <span class="n">thread</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Thread</span><span class="o">(</span><span class="k">this</span><span class="o">);</span>
+        <span class="n">m_end</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">thread</span><span class="o">.</span><span class="na">start</span><span class="o">();</span>
+    <span class="o">}</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * Stopping.</span>
+<span class="cm">     */</span>
+    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">stopping</span><span class="o">()</span> <span class="o">{</span>
+        <span class="n">m_end</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>The <em>Hello</em> service client creates a thread that periodically invokes the available <em>Hello</em> services. The thread starts when at least one <em>Hello</em> service provider is present using iPOJO's call back mechanism. In the client code, to use the <em>hello</em> the component implementation simply declares a field of the type of the service and then simply uses it directly in its code. In this example, it is the m_hello field is declared as the service field; notice that the field is an array of <em>Hello</em>. In iPOJO an array of services represents an aggregate or multiple cardinality dependency, whereas if a scalar value represents a singular or unary cardinality dependency. In other words, for a singular dependency simply remove the array brackets from the example (e.g., HelloService m_hello[]. After declaring a field for the service, the rest of the component code can simply assume that the service field will be initialized, e.g., m_hello[i].sayHello("w
 orld").</p>
+<p>Notice that iPOJO manages service synchronization too. So, the service invocations do not require synchronization blocks. This synchronization is maintained on a per thread basis, where each method that accesses a service is instrumented to attach the given service instance to the thread so that the thread will continue to see the same service instances even across nested method invocations. The thread will not see different service instances until it completely exits from the first method it entered which used a services. Thus, you would not want to access services in the  method above, because the thread would always see the same service instance.</p>
+<p>The component provides two callback methods for its activation and deactivation, starting() and stopping(), respectively. Callbacks are used when the component needs to be informed about a component state change. In iPOJO, the component state is either <em>INVALID</em> (i.e., not all of the component's constraints are satisfied) or <em>VALID</em> (i.e., all of the component's constraints are satisfied). In this example, the starting callback method creates and starts a thread; the stopping callback method stops the thread. The component metadata will instruct iPOJO to invoke these methods when the component's state changes to <em>VALID</em> or <em>INVALID</em> respectively.</p>
+<p>The iPOJO metadata file describing the component is "metadata.xml" and contains the following metadata:</p>
+<div class="codehilite"><pre><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
+<span class="nt">&lt;ipojo</span> 
+    <span class="na">xmlns:xsi=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
+    <span class="na">xsi:schemaLocation=</span><span class="s">&quot;org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/CURRENT/core.xsd&quot;</span> 
+    <span class="na">xmlns=</span><span class="s">&quot;org.apache.felix.ipojo&quot;</span><span class="nt">&gt;</span>
+
+  <span class="nt">&lt;component</span> <span class="na">classname=</span><span class="s">&quot;ipojo.example.hello.client.HelloClient&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;requires</span> <span class="na">field=</span><span class="s">&quot;m_hello&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;callback</span> <span class="na">transition=</span><span class="s">&quot;validate&quot;</span> <span class="na">method=</span><span class="s">&quot;starting&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;callback</span> <span class="na">transition=</span><span class="s">&quot;invalidate&quot;</span> <span class="na">method=</span><span class="s">&quot;stopping&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;properties&gt;</span>
+      <span class="nt">&lt;property</span> <span class="na">field=</span><span class="s">&quot;m_name&quot;</span> <span class="na">name=</span><span class="s">&quot;hello.name&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;/properties&gt;</span>
+  <span class="nt">&lt;/component&gt;</span>
+
+  <span class="nt">&lt;instance</span> <span class="na">component=</span><span class="s">&quot;ipojo.example.hello.client.HelloClient&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;hello.name&quot;</span> <span class="na">value=</span><span class="s">&quot;clement&quot;</span> <span class="nt">/&gt;</span>
+  <span class="nt">&lt;/instance&gt;</span>
+<span class="nt">&lt;/ipojo&gt;</span>
 </pre></div>
 
 
 <p>The component element again has the '<em>classname'</em> attribute that refers to the component implementation class. The '<em>requires</em>' element describes the <em>Hello</em> service dependency by simply specifying its associated component field. The '<em>callback'</em>elements describe which method to invoke when the component's state changes. Then the '<em>instance</em>' element asks iPOJO to create an instance of the component (notice that no instance name is provided here, iPOJO will give an instance name to the instance automatically).</p>
-<p>Finally, the "pom.xml" file contains instructions to build the bundle:
-{div:class=pom}
-<project>
-&nbsp;&nbsp;<modelVersion>4.0.0</modelVersion>
-&nbsp;&nbsp;<packaging>bundle</packaging>
-&nbsp;&nbsp;{color:red}<groupId>ipojo.example</groupId>{color}
-{color:red}&nbsp;&nbsp;<artifactId>hello.client</artifactId>{color}
-{color:red}&nbsp;&nbsp;<version>1.0.0</version>{color}
-{color:red}&nbsp;&nbsp;<name>Hello Client</name>{color}</p>
-<p>{color:red}&nbsp;&nbsp;<dependencies>{color}
-{color:red}&nbsp;&nbsp; &nbsp;<dependency> &lt;!--{color} {color:red}Compilation (i.e. class) dependency on the service interface --{color}{color:red}&gt;{color}
-{color:red}&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<groupId>ipojo.example</groupId>{color}
-{color:red}&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<artifactId>hello.service</artifactId>{color}
-{color:red}&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<version>{color}{color:#ff0000}1.0.0{color}{color:red}</version>{color}
-{color:red}&nbsp;&nbsp; &nbsp;</dependency>{color}
-{color:red}&nbsp; </dependencies>{color}</p>
-<p>&nbsp; <build>
-&nbsp;&nbsp;&nbsp;&nbsp; <plugins>
-&nbsp;&nbsp;&nbsp;&nbsp; <plugin>
-&nbsp;&nbsp;&nbsp;&nbsp; <groupId>org.apache.felix</groupId>
-&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>maven-bundle-plugin</artifactId>
-&nbsp;&nbsp;&nbsp;&nbsp; <version>2.0.1</version>
-&nbsp;&nbsp;&nbsp;&nbsp; <extensions>true</extensions>
-&nbsp;&nbsp;&nbsp;&nbsp; <configuration>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <instructions>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {color:red}<Private-Package>ipojo.example.hello.client</Private-Package>{color}
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </instructions>
-&nbsp;&nbsp;&nbsp;&nbsp; </configuration>
-&nbsp;&nbsp; </plugin>
-&nbsp;&nbsp; <plugin>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>org.apache.felix</groupId>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>maven-ipojo-plugin</artifactId>
-&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <version>1.6.0</version>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <executions>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <execution>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <goals>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <goal>ipojo-bundle</goal>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </goals>
-&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </execution>
-&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </executions>
-&nbsp;&nbsp; </plugin>
-&nbsp;</plugins>
-&nbsp; </build>
-</project>
-{div}
-The text highlighted in {color:red}{<em>}red{</em>}{color} above indicates the information related to the project. The <em>dependencies</em> element tells Maven that the client bundle has a compilation dependency on the service provider bundle. In this case, the client bundle needs the <em>Hello</em> service interface to compile. After building the service provider bundle JAR file, Maven installs it into a local repository on your machine. To resolve compilation dependencies, Maven looks in the local repository to find required JAR files.
-After the skeleton "pom.xml" file is modified, the project is ready to be built issuing the following Maven command inside the project directory:
-mvn clean install
-Maven should report that the build was a success; if an error was reported then verify the previous steps. Upon success the <em>Hello</em> service component JAR file is installed into the local Maven repository. A copy of the bundle JAR file will also be present in the "target" directory inside the project directory.</p>
+<p>Finally, the <code>pom.xml</code> file contains instructions to build the bundle:</p>
+<div class="pom"><p>&lt;project&gt;<br>
+&nbsp;&nbsp;&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br>
+&nbsp;&nbsp;&lt;packaging&gt;bundle&lt;/packaging&gt;<br>
+&nbsp;&nbsp;<font color="red">&lt;groupId&gt;ipojo.example&lt;/groupId&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&lt;artifactId&gt;hello.client&lt;/artifactId&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&lt;version&gt;1.0.0&lt;/version&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&lt;name&gt;Hello Client&lt;/name&gt;</font></p>
+
+<p><font color="red">&nbsp;&nbsp;&lt;dependencies&gt;</font><br>
+<font color="red">&nbsp;&nbsp; &nbsp;&lt;dependency&gt; &lt;!--</font> <font color="red">Compilation (i.e. class) dependency on the service interface --</font><font color="red">&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;groupId&gt;ipojo.example&lt;/groupId&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;artifactId&gt;hello.service&lt;/artifactId&gt;</font><br>
+<font color="red">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;version&gt;</font><font color="#ff0000">1.0.0</font><font color="red">&lt;/version&gt;</font><br>
+<font color="red">&nbsp;&nbsp; &nbsp;&lt;/dependency&gt;</font><br>
+<font color="red">&nbsp; &lt;/dependencies&gt;</font></p>
+
+<p>&nbsp; &lt;build&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;plugins&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;plugin&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;version&gt;2.0.1&lt;/version&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;extensions&gt;true&lt;/extensions&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;configuration&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;instructions&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Bundle-SymbolicName&gt;${pom.artifactId}&lt;/Bundle-SymbolicName&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="red">&lt;Private-Package&gt;ipojo.example.hello.client&lt;/Private-Package&gt;</font><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/instructions&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &lt;/configuration&gt;<br>
+&nbsp;&nbsp; &lt;/plugin&gt;<br>
+&nbsp;&nbsp; &lt;plugin&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;maven-ipojo-plugin&lt;/artifactId&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &lt;version&gt;1.6.0&lt;/version&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;executions&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;execution&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;goals&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;goal&gt;ipojo-bundle&lt;/goal&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/goals&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/execution&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &lt;/executions&gt;<br>
+&nbsp;&nbsp; &lt;/plugin&gt;<br>
+&nbsp;&lt;/plugins&gt;<br>
+&nbsp; &lt;/build&gt;<br>
+&lt;/project&gt;</p></div>
+
+<p>The text highlighted in <span style="color:red">red</code> above indicates the information related to the project. The <em>dependencies</em> element tells Maven that the client bundle has a compilation dependency on the service provider bundle. In this case, the client bundle needs the <em>Hello</em> service interface to compile. After building the service provider bundle JAR file, Maven installs it into a local repository on your machine. To resolve compilation dependencies, Maven looks in the local repository to find required JAR files.
+After the skeleton "pom.xml" file is modified, the project is ready to be built issuing the following Maven command inside the project directory:</p>
+<div class="codehilite"><pre>mvn clean install
+</pre></div>
+
+
+<p>Maven should report that the build was a success; if an error was reported then verify the previous steps. Upon success the <em>Hello</em> service component JAR file is installed into the local Maven repository. A copy of the bundle JAR file will also be present in the "target" directory inside the project directory.</p>
 <h2 id="running-the-example">Running the example</h2>
 <p>To run the example, start Felix. A distribution of Felix is provided in the felix-1.0.3 directory. This version is configured to launch iPOJO automatically. From the Felix directory, launch the following command to start the framework</p>
-<div class="codehilite"><pre><span class="n">java</span> <span class="o">-</span><span class="n">jar</span> <span class="n">bin</span><span class="o">/</span><span class="n">felix</span><span class="o">.</span><span class="n">jar</span>
+<div class="codehilite"><pre>java -jar bin/felix.jar
 </pre></div>
 
 
 <p>You can check installed bundles by using the '<em>ps'</em> command:</p>
-<div class="codehilite"><pre><span class="o">-&gt;</span> <span class="n">ps</span>
-<span class="n">START</span> <span class="n">LEVEL</span> <span class="mi">1</span>
-   <span class="n">ID</span>   <span class="n">State</span>         <span class="n">Level</span>  <span class="n">Name</span>
-<span class="p">[</span>   <span class="mi">0</span><span class="p">]</span> <span class="p">[</span><span class="n">Active</span>     <span class="p">]</span> <span class="p">[</span>    <span class="mi">0</span><span class="p">]</span> <span class="n">System</span> <span class="n">Bundle</span> <span class="p">(</span><span class="mf">2.0.5</span><span class="p">)</span>
-<span class="p">[</span>   <span class="mi">1</span><span class="p">]</span> <span class="p">[</span><span class="n">Active</span>     <span class="p">]</span> <span class="p">[</span>    <span class="mi">1</span><span class="p">]</span> <span class="n">Apache</span> <span class="n">Felix</span> <span class="n">Bundle</span> <span class="n">Repository</span> <span class="p">(</span><span class="mf">1.4.3</span><span class="p">)</span>
-<span class="p">[</span>   <span class="mi">2</span><span class="p">]</span> <span class="p">[</span><span class="n">Active</span>     <span class="p">]</span> <span class="p">[</span>    <span class="mi">1</span><span class="p">]</span> <span class="n">Apache</span> <span class="n">Felix</span> <span class="n">iPOJO</span> <span class="p">(</span><span class="mf">1.6.0</span><span class="p">)</span>
-<span class="p">[</span>   <span class="mi">3</span><span class="p">]</span> <span class="p">[</span><span class="n">Active</span>     <span class="p">]</span> <span class="p">[</span>    <span class="mi">1</span><span class="p">]</span> <span class="n">Apache</span> <span class="n">Felix</span> <span class="n">iPOJO</span> <span class="n">Arch</span> <span class="n">Command</span> <span class="p">(</span><span class="mf">1.6.0</span><span class="p">)</span>
-<span class="p">[</span>   <span class="mi">4</span><span class="p">]</span> <span class="p">[</span><span class="n">Active</span>     <span class="p">]</span> <span class="p">[</span>    <span class="mi">1</span><span class="p">]</span> <span class="n">Apache</span> <span class="n">Felix</span> <span class="n">Shell</span> <span class="n">Service</span> <span class="p">(</span><span class="mf">1.4.2</span><span class="p">)</span>
-<span class="p">[</span>   <span class="mi">5</span><span class="p">]</span> <span class="p">[</span><span class="n">Active</span>     <span class="p">]</span> <span class="p">[</span>    <span class="mi">1</span><span class="p">]</span> <span class="n">Apache</span> <span class="n">Felix</span> <span class="n">Shell</span> <span class="n">TUI</span> <span class="p">(</span><span class="mf">1.4.1</span><span class="p">)</span>
-<span class="o">-&gt;</span>
+<div class="codehilite"><pre>-&gt; ps
+START LEVEL 1
+   ID   State         Level  Name
+<span class="o">[</span>   0<span class="o">]</span> <span class="o">[</span>Active     <span class="o">]</span> <span class="o">[</span>    0<span class="o">]</span> System Bundle <span class="o">(</span>2.0.5<span class="o">)</span>
+<span class="o">[</span>   1<span class="o">]</span> <span class="o">[</span>Active     <span class="o">]</span> <span class="o">[</span>    1<span class="o">]</span> Apache Felix Bundle Repository <span class="o">(</span>1.4.3<span class="o">)</span>
+<span class="o">[</span>   2<span class="o">]</span> <span class="o">[</span>Active     <span class="o">]</span> <span class="o">[</span>    1<span class="o">]</span> Apache Felix iPOJO <span class="o">(</span>1.6.0<span class="o">)</span>
+<span class="o">[</span>   3<span class="o">]</span> <span class="o">[</span>Active     <span class="o">]</span> <span class="o">[</span>    1<span class="o">]</span> Apache Felix iPOJO Arch Command <span class="o">(</span>1.6.0<span class="o">)</span>
+<span class="o">[</span>   4<span class="o">]</span> <span class="o">[</span>Active     <span class="o">]</span> <span class="o">[</span>    1<span class="o">]</span> Apache Felix Shell Service <span class="o">(</span>1.4.2<span class="o">)</span>
+<span class="o">[</span>   5<span class="o">]</span> <span class="o">[</span>Active     <span class="o">]</span> <span class="o">[</span>    1<span class="o">]</span> Apache Felix Shell TUI <span class="o">(</span>1.4.1<span class="o">)</span>
+-&gt;
 </pre></div>
 
 
 <p>iPOJO runtime is the bundle 4. The bundle 5 is a Felix shell command allowing the introspection of iPOJO component instances (see herefor further information).</p>
-<p>Install the Hello service bundle, the <em>Hello</em> service provider and the client that were created above:
-{div:class=shell}
-start file:../hello.service/target/hello.service-1.0.0.jar
+<p>Install the Hello service bundle, the <em>Hello</em> service provider and the client that were created above:</p>
+<div class="codehilite"><pre>start file:../hello.service/target/hello.service-1.0.0.jar
 start file:../hello.impl/target/hello.impl-1.0.0.jar
 start file:../hello.client/target/hello.client-1.0.0.jar
-{div}
-By starting the <em>Hello</em> service provider bundle, the client component will automatically be activated. So, the <em>'hello world'</em> messages are displayed.
-{div:class=shell}
--&gt; hello world
-hello world
-{div}
-Stop the provider (with the '<em>stop 7</em>' command) and the client will automatically be deactivated since its dependency is no longer valid. If multiple Hello services are deployed, the client will connect to all of them. If you restart the bundle (with the <em>start 7</em> command), the client becomes valid.</p>
-<p>During these operations, you can use the arch command to check the state of instances.
-{div:class=shell}
--&gt; stop 7
--&gt; arch
-Instance ArchCommand -&gt; valid
-{color:red}Instance ipojo.example.hello.client.HelloClient-0 -&gt; invalid{color}
--&gt; arch -instance ipojo.example.hello.client.HelloClient-0
-instance name="ipojo.example.hello.client.HelloClient-0" 
-&nbsp;component.type="ipojo.example.hello.client.HelloClient" 
-&nbsp;state="{color:red}invalid{color}" bundle="8"
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object name="ipojo.example.hello.client.HelloClient@137c60d"
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {color:red}handler name="org.apache.felix.ipojo.handlers.dependency.DependencyHandler" state="invalid"{color}
-{color:red}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{color}{color:red}requires aggregate="true" optional="false" state="resolved" specification="ipojo.example.hello.Hello"{color}
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; handler name="org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler" state="valid"
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; handler name="org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler" state="valid"
--&gt; start 7
+</pre></div>
+
+
+<p>By starting the <em>Hello</em> service provider bundle, the client component will automatically be activated. So, the <em>'hello world'</em> messages are displayed.</p>
+<div class="codehilite"><pre>-&gt; hello world
 hello world
--&gt; arch
-Instance ArchCommand -&gt; valid
-{color:red}Instance ipojo.example.hello.client.HelloClient-0 -&gt; valid{color}
-Instance HelloService -&gt; valid
--&gt; arch -instance ipojo.example.hello.client.HelloClient-0
-instance name="ipojo.example.hello.client.HelloClient-0" 
-&nbsp;component.type="ipojo.example.hello.client.HelloClient"
-&nbsp; state="valid" bundle="8"
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object name="ipojo.example.hello.client.HelloClient@137c60d"
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {color:red}handler name="org.apache.felix.ipojo.handlers.dependency.DependencyHandler" state="valid"{color}
-{color:red}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{color}{color:red}requires aggregate="true" optional="false" state="resolved" specification="ipojo.example.hello.Hello"{color}
-{color:red}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{color} {color:red}uses service.id="38" instance.name="HelloService"{color}
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; handler name="org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler" state="valid"
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; handler name="org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler" state="valid"
-{div}</p>
+</pre></div>
+
+
+<p>Stop the provider (with the '<em>stop 7</em>' command) and the client will automatically be deactivated since its dependency is no longer valid. If multiple Hello services are deployed, the client will connect to all of them. If you restart the bundle (with the <em>start 7</em> command), the client becomes valid.</p>
+<p>During these operations, you can use the arch command to check the state of instances.</p>
+<div class="shell"><p>-&gt; stop 7<br>
+-&gt; arch<br>
+Instance ArchCommand -&gt; valid<br>
+<font color="red">Instance ipojo.example.hello.client.HelloClient-0 -&gt; invalid</font><br>
+-&gt; arch -instance ipojo.example.hello.client.HelloClient-0<br>
+instance name="ipojo.example.hello.client.HelloClient-0" <br>
+&nbsp;component.type="ipojo.example.hello.client.HelloClient" <br>
+&nbsp;state="<font color="red">invalid</font>" bundle="8"<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object name="ipojo.example.hello.client.HelloClient@137c60d"<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="red">handler name="org.apache.felix.ipojo.handlers.dependency.DependencyHandler" state="invalid"</font><br>
+<font color="red">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="red">requires aggregate="true" optional="false" state="resolved" specification="ipojo.example.hello.Hello"</font><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; handler name="org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler" state="valid"<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; handler name="org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler" state="valid"<br>
+-&gt; start 7<br>
+hello world<br>
+-&gt; arch<br>
+Instance ArchCommand -&gt; valid<br>
+<font color="red">Instance ipojo.example.hello.client.HelloClient-0 -&gt; valid</font><br>
+Instance HelloService -&gt; valid<br>
+-&gt; arch -instance ipojo.example.hello.client.HelloClient-0<br>
+instance name="ipojo.example.hello.client.HelloClient-0" <br>
+&nbsp;component.type="ipojo.example.hello.client.HelloClient"<br>
+&nbsp; state="valid" bundle="8"<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object name="ipojo.example.hello.client.HelloClient@137c60d"<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="red">handler name="org.apache.felix.ipojo.handlers.dependency.DependencyHandler" state="valid"</font><br>
+<font color="red">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="red">requires aggregate="true" optional="false" state="resolved" specification="ipojo.example.hello.Hello"</font><br>
+<font color="red">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <font color="red">uses service.id="38" instance.name="HelloService"</font><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; handler name="org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler" state="valid"<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; handler name="org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler" state="valid"</p></div>
+
 <h2 id="conclusion">Conclusion</h2>
-<p>We saw how to use easily iPOJO to build service-oriented components. Subscribe to the Felix users mailing list by sending a message to <a href="">mailto:users-subscribe@felix.apache.org</a>; after subscribing, email questions or feedback to [mailto:users@felix.apache.org].</p>
+<p>We saw how to use easily iPOJO to build service-oriented components. Subscribe to the Felix users mailing list by sending a message to <a href="mailto:users-subscribe@felix.apache.org">users-subscribe@felix.apache.org</a>; after subscribing, email questions or feedback to <a href="mailto:users@felix.apache.org">users@felix.apache.org</a>.</p>
         </div>
     </div>
 
@@ -548,7 +549,7 @@ instance name="ipojo.example.hello.clien
                 may be trademarks or registered trademarks of their respective owners.
                 </div>
                 <div class="timestamp span3 offset2">
-                Rev. 1441864 by fmeschbe on Sun, 3 Feb 2013 06:44:40 +0000
+                Rev. 1443044 by clement on Wed, 6 Feb 2013 16:25:48 +0000
                 </div>
             </div>
         </footer>