felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r849204 [4/33] - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/ documentation/subprojects/apache-felix-ipojo/ documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-devguide/ documentation/subprojects/apach...
Date Sun, 03 Feb 2013 06:45:22 GMT
Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/apache-felix-ipojo-dosgi.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/apache-felix-ipojo-dosgi.html
(original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/apache-felix-ipojo-dosgi.html
Sun Feb  3 06:45:21 2013
@@ -20,9 +20,45 @@
   <head>
     <title>Apache Felix - apache-felix-ipojo-dosgi</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">
+    <link rel="stylesheet" href="/site/media.data/site.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/ipojo/site/superfish.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/ipojo/site/style.css" type="text/css" media="all">
     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    
+    <!--
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shCore.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushCSharp.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushPhp.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushJScript.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushVb.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushSql.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushXml.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushShell.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushDelphi.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushPython.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushJava.js"></script>
+    -->
+    
+    <script type="text/javascript" src="/ipojo/site/jquery-1.js"></script>
+    <script type="text/javascript" src="/ipojo/site/hoverIntent.js"></script>
+    <script type="text/javascript" src="/ipojo/site/superfish.js"></script> 
+    <script type="text/javascript" src="/ipojo/site/supersubs.js"></script> 
+    
+    <script type="text/javascript"> 
+     
+        $(document).ready(function(){ 
+            $("ul.sf-menu").supersubs({ 
+                minWidth:    14,   // minimum width of sub-menus in em units 
+                maxWidth:    30,   // maximum width of sub-menus in em units 
+                extraWidth:  1     // extra width can ensure lines don't sometimes turn over

+                                   // due to slight rounding differences and font-family

+            }).superfish();  // call supersubs first, then superfish, so that subs are 
+                             // not display:none when measuring. Call before initialising

+                             // containing tabs for same reason. 
+        }); 
+     
+    </script>
+    
   </head>
   <body>
     <div class="title">
@@ -37,137 +73,223 @@
         </a>
       </div>
     </div>
+  
+    <div class="main">
+    <div class="main">
+    <div class="page-header">
+    <img src="/ipojo/site/header.png" class="header">
+    <a href="http://ipojo.org"><img src="/ipojo/site/ipojo.png" width="225" class="header-logo"></a>
+    <ul class="sf-menu sf-js-enabled sf-shadow" id="ipojo-menu">
+    <li class="current">
+    <!-- Menu Overview -->
+    <a href="#" class="sf-with-ul">Overview<span class="sf-sub-indicator"> »</span><span
class="sf-sub-indicator"> »</span></a>
+    <ul>
+        <li>
+        <a href="">Home</a>                          
+        </li>
+        <li>
+        <a href="">Why choose iPOJO</a>
+        </li>
+        <li>
+        <a href="">Success stories</a>
+        </li>
+        <li>
+        <a href="">Features</a>
+        </li>
+    </ul>
+    </li>   
     
-    <div class="menu"> 
-      <p><a href="/news.html">news</a>  <br />
-<a href="/license.html">license</a>  <br />
-<a href="/downloads.cgi">downloads</a>  <br />
-<a href="/documentation.html">documentation</a>  <br />
-<a href="/mailinglists.html">mailing lists</a>  <br />
-<a href="/documentation/community/contributing.html">contributing</a>  <br
/>
-<a href="/sitemap.html">site map</a>  <br />
-<a href="http://www.apache.org/">asf</a>  <br />
-<a href="http://www.apache.org/security/">security</a>  <br />
-<a href="http://www.apache.org/foundation/sponsorship.html">sponsorship</a> 
<br />
-<a href="http://www.apache.org/foundation/thanks.html">sponsors</a>  <br />
-</p>
-<iframe
-    src="http://www.apache.org/ads/button.html"
-    style="border-width:0; float: left"
-    frameborder="0"
-    scrolling="no"
-    width="135"
-    height="135">
-</iframe>
-    </div>
+    <li class="">           
+    <!-- Menu download -->
+    <li>
+    <a href="/downloads.cgi">Download </a>
+    </li>
     
-    <div class="main">
-      <div class="breadcrump" style="font-size: 80%;">
-        <a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/documentation.html">Documentation</a>&nbsp;&raquo&nbsp;<a
href="/documentation/subprojects.html">Apache Felix Subproject Documentation</a>&nbsp;&raquo&nbsp;<a
href="/documentation/subprojects/apache-felix-ipojo.html">Apache Felix iPOJO</a>&nbsp;&raquo&nbsp;<a
href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted.html">apache-felix-ipojo-gettingstarted</a>
-      </div>
-
+    <li class="">                   
+    <!-- Menu Documentation -->
+    <a href="#" class="sf-with-ul">Documentation<span class="sf-sub-indicator">
»</span><span class="sf-sub-indicator"> »</span></a>
+    <ul>
+        <!-- sub-menu : getting started -->
+        <li class="">
+        <a href="#" class="sf-with-ul">Getting Started<span class="sf-sub-indicator">
»</span><span class="sf-sub-indicator"> »</span></a>
+        <ul>
+         <li><a href="">iPOJO in 10 minutes</a></li>
+         <li><a href="">Using Annotations</a></li>
+         <li><a href="">Maven tutorial</a></li>
+         <li><a href="">Advanced tutorial</a></li>
+         <li><a href="">Using Distributed OSGi</a></li>
+         <li><a href="">Application Composition</a></li>
+        </ul>
+        </li> <!-- end of getting started -->
+        <!-- sub menu : Describing Components -->
+         <li class="">
+            <a href="" class="sf-with-ul">Describing components<span class="sf-sub-indicator">
»</span><span class="sf-sub-indicator"> »</span></a>
+            <ul>
+            <li><a href="">Requiring a service</a></li>
+            <li><a href="">Providing a service</a></li>
+            <li><a href="">Lifecycle management</a></li>
+            <li><a href="">Configuration</a></li>
+            <li><a href="">Introspection</a></li>
+            <li><a href="">Impacting the lifecycle</a></li>
+            <li><a href="">Asynchronous communication</a></li>
+            <li><a href="">JMX management</a></li>
+            <li><a href="">Extender pattern</a></li>
+            <li><a href="">Whiteboard pattern</a></li>
+            <li><a href="">Temporal dependencies</a></li>
+            </ul>
+         </li> <!-- End of describing components -->
+        <!-- sub-menu : User Guide -->
+        <li class="">
+        <a href="" class="sf-with-ul">User Guide<span class="sf-sub-indicator">
»</span><span class="sf-sub-indicator"> »</span></a>
+            <ul>
+            <li><a href="">iPOJO and config admin</a></li>
+            <li><a href="">Factories and Instances</a></li>
+            <li><a href="">XML Schemas</a></li>
+            <li><a href="">API</a></li>
+            <li><a href="">Testing components</a></li>
+            <li><a href="">Eclipse Integration</a></li>
+            <li><a href="">FAQ</a></li>
+            <li><a href="">Reference Card</a></li>
+            </ul>
+        </li> <!-- end of user guide -->
+        <!-- sub-menu : Dev Guide -->
+        <li> 
+        <a href="#" class="sf-with-ul">Advanced Topics<span class="sf-sub-indicator">
»</span><span class="sf-sub-indicator"> »</span></a>
+           <ul>
+            <li><a href="http://felix.apache.org/ipojo/api/1.6.0">Javadoc</a></li>
+            <li><a href="">Handler development</a></li>
+            <li><a href="">Manipulation Metadata </a></li>
+            <li><a href="">Dive into the iPOJO Manipulation depths</a></li>
+           </ul>
+        </li> <!-- End of Dev guide -->
+    </ul> 
+    </li> <!-- End of doc -->
+    <!-- Menu 4 : Tools -->
+    <li class="">
+    <a href="#" class="sf-with-ul">Tools<span class="sf-sub-indicator"> »</span><span
class="sf-sub-indicator"> »</span></a>
+    <ul>
+       <li><a href="">Ant Task</a></li>
+       <li><a href="">Eclipse Plugin</a></li>
+       <li><a href="">Maven Plugin</a></li>
+       <li><a href="">`arch` shell command</a></li>
+       <li><a href="">Online Manipulator</a></li>
+       <li><a href="">Webconsole plugin</a></li>
+       <li><a href="">Junit4OSGi</a></li>
+    </ul>   
+    </li><!-- End of tools -->  
+    <!-- Menu 5 : Support -->
+    <li>
+    <a href="">Support </a>
+    </li>
+    <!-- End of the menu 5 -->          
+    <!-- Menu 6 : Misc -->
+    <li class="">
+    <a href="#" class="sf-with-ul">Misc<span class="sf-sub-indicator"> »</span><span
class="sf-sub-indicator"> »</span></a>
+    <ul>
+       <li><a href="">Supported JVMs</a></li>
+       <li><a href="">Supported OSGi Implementations</a></li>
+       <li><a href="http://ipojo-dark-side.blogspot.com">iPOJO's Dark Side Blog</a></li>
+       <li><a href="">Article & Presentations</a></li>
+       <li><a href="http://www.apache.org/">ASF</a></li>
+       <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+       <li><a href="http://www.apache.org/foundation/thanks.html">Sponsors</a></li>
+    </ul>
+    </li><!-- End of misc -->
+    </ul> <!-- End of the menu -->
+    </div> <!-- Page header -->
+  
+      <!-- 
       
       <div class="tip">
            This page is a translated version of <a href="/site/apache-felix-ipojo-dosgi.html"
target="felix_cwiki">/site/apache-felix-ipojo-dosgi.html</a>. In case of
            doubt you might want to refer to the old page.
       </div>
       
+      -->
       
       <h1>apache-felix-ipojo-dosgi</h1>
-      <p>{include:apache-felix-ipojo-header}</p>
-<div class="content">
-
-# Using Distributed Services with iPOJO 
-
-*Distributed Service defines how to deal with remote services in OSGi. This page describes
the CXF Distributed OSGi with iPOJO demo.This demo uses iPOJO to create a remote OSGi service
from an iPOJO component. The consumer side also uses iPOJO to create a component that consumes
the remote OSGi service. By using iPOJO, you don't need to write code to interact with the
OSGi Service Registry at all. That's all handled through injection, which hugely simplifies
the code. Moreover thanks to iPOJO's advanced features such as property propagation, the service
is exported without any impact on its implementation.*
-
-In this demo, you will show how to use iPOJO:
-* to expose a service 
-* to propagate properties to make the service remotely accessible
-* to use a "remote" service
-
-This demo can be used with any DOSGi distribution, in this document the single-bundle distribution
(1.1) is used with iPOJO 1.6.0 and Felix (2.0.5)
-
-{div:class=toc}
+      
+      <div class="content">
+        <h1 id="using-distributed-services-with-ipojo">Using Distributed Services with
iPOJO</h1>
+<p><em>Distributed Service defines how to deal with remote services in OSGi.
This page describes the CXF Distributed OSGi with iPOJO demo.This demo uses iPOJO to create
a remote OSGi service from an iPOJO component. The consumer side also uses iPOJO to create
a component that consumes the remote OSGi service. By using iPOJO, you don't need to write
code to interact with the OSGi Service Registry at all. That's all handled through injection,
which hugely simplifies the code. Moreover thanks to iPOJO's advanced features such as property
propagation, the service is exported without any impact on its implementation.</em></p>
+<p>In this demo, you will show how to use iPOJO:
+<em> to expose a service 
+</em> to propagate properties to make the service remotely accessible
+* to use a "remote" service</p>
+<p>This demo can be used with any DOSGi distribution, in this document the single-bundle
distribution (1.1) is used with iPOJO 1.6.0 and Felix (2.0.5)</p>
+<p>{div:class=toc}
 [TOC]
-{div}
+{div}</p>
+<h2 id="demo-design">Demo design</h2>
+<p>This demo is quite similar to the DS demo of DOSGi demo in structure. It consists
of 5 bundles:
+<em> An interface bundle defining the Adder Service interface. 
+</em> This bundle is deployed on both sides.
+<em> An Adder Service implementation bundle. (The service will be exported)
+</em> An Adder Service importer bundle containing the remote-service file explaining
to DOSGi how to import and from where to import the Adder service.
+* An Adder Service consumer bundle.</p>
+<p>!design.png!</p>
+<p>The service implementation and consumer bundle are built using iPOJO.
+The Adder Service interface is as follows:</p>
+<div class="codehilite"><pre><span class="n">public</span> <span
class="n">interface</span> <span class="n">AdderService</span> <span
class="p">{</span>
+    <span class="nb">int</span> <span class="n">add</span><span
class="p">(</span><span class="nb">int</span> <span class="n">a</span><span
class="p">,</span><span class="nb">int</span> <span class="n">b</span><span
class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<h2 id="sources">Sources</h2>
+<p>The sources and a pre-configured version of Felix are available in the <a href="http://people.apache.org/~clement/ipojo/tutorials/dosgi/dosgi-tutorial.zip">dosgi-tutorial
archive</a>. Once downloaded unzip the archive. To compile, run from the root : <code>mvn
clean install</code>. To run the application. go to the <code>felix</code>
directory containing a pre-configured Felix.</p>
+<h2 id="the-adder-service-implementation">The Adder Service Implementation</h2>
+<p>The service implementation is a simplistic implementation of the Adder service,
which is instantiated as an iPOJO component. This implementation uses annotations to define
its component type. The <code>@provides</code> annotation just says that it provides
a service. Moreover, the <code>propagation=true</code> attribute enables property
propagation.</p>
+<p>In the <a href="http://svn.apache.org/repos/asf/felix/sandbox/clement/ipojo-tutorials/dosgi/AdderServiceProvider/src/main/resources/metadata.xml">metadata.xml</a>
file, an instance of the component type is declared. Note that this instance declaration defines
three properties used by DOSGi to exports the service. These properties instruct Distributed
OSGi into making the service available on http://localhost:9090/adder. Those properties are
not declared in the component type itself. Indeed, the component type enables property propagation;
so all defined properties will be published on exported services. This propagation also works
with the configuration admin. This feature is pretty nice, as it does not impact the component
implementation and its description.</p>
+<div class="codehilite"><pre><span class="nt">&lt;instance</span>
<span class="na">component=</span><span class="s">&quot;org.apache.felix.ipojo.remote.adder.impl.AdderServiceImpl&quot;</span><span
class="nt">&gt;</span>
+    <span class="nt">&lt;property</span> <span class="na">name=</span><span
class="s">&quot;osgi.remote.interfaces&quot;</span><span class="na">value=</span><span
class="s">&quot;*&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;property</span> <span class="na">name=</span><span
class="s">&quot;osgi.remote.configuration.type&quot;</span><span class="na">value=</span><span
class="s">&quot;pojo&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;property</span> <span class="na">name=</span><span
class="s">&quot;osgi.remote.configuration.pojo.address&quot;</span><span
class="na">value=</span><span class="s">&quot;http://localhost:9090/adder&quot;</span><span
class="nt">/&gt;</span>
+<span class="nt">&lt;/instance&gt;</span>
+</pre></div>
 
-## Demo design
-This demo is quite similar to the DS demo of DOSGi demo in structure. It consists of 5 bundles:
-* An interface bundle defining the Adder Service interface. 
-* This bundle is deployed on both sides.
-* An Adder Service implementation bundle. (The service will be exported)
-* An Adder Service importer bundle containing the remote-service file explaining to DOSGi
how to import and from where to import the Adder service.
-* An Adder Service consumer bundle.
-
-!design.png!
-
-The service implementation and consumer bundle are built using iPOJO.
-The Adder Service interface is as follows:
-
-    public interface AdderService {
-        int add(int a,int b);
-    }
-
-## Sources
-The sources and a pre-configured version of Felix are available in the [dosgi-tutorial archive](http://people.apache.org/~clement/ipojo/tutorials/dosgi/dosgi-tutorial.zip).
Once downloaded unzip the archive. To compile, run from the root : `mvn clean install`. To
run the application. go to the `felix` directory containing a pre-configured Felix.
-
-## The Adder Service Implementation
-The service implementation is a simplistic implementation of the Adder service, which is
instantiated as an iPOJO component. This implementation uses annotations to define its component
type. The `@provides` annotation just says that it provides a service. Moreover, the `propagation=true`
attribute enables property propagation.
-
-In the [metadata.xml](http://svn.apache.org/repos/asf/felix/sandbox/clement/ipojo-tutorials/dosgi/AdderServiceProvider/src/main/resources/metadata.xml)
file, an instance of the component type is declared. Note that this instance declaration defines
three properties used by DOSGi to exports the service. These properties instruct Distributed
OSGi into making the service available on http://localhost:9090/adder. Those properties are
not declared in the component type itself. Indeed, the component type enables property propagation;
so all defined properties will be published on exported services. This propagation also works
with the configuration admin. This feature is pretty nice, as it does not impact the component
implementation and its description.
-
-    <instance component="org.apache.felix.ipojo.remote.adder.impl.AdderServiceImpl">
-        <property name="osgi.remote.interfaces"value="*"/>
-        <property name="osgi.remote.configuration.type"value="pojo"/>
-        <property name="osgi.remote.configuration.pojo.address"value="http://localhost:9090/adder"/>
-    </instance>
 
-So let's install the server side in Felix. Launch Felix from the `felix` directory with:
+<p>So let's install the server side in Felix. Launch Felix from the <code>felix</code>
directory with:
 {div:class=shell}
 java -jar bin/felix.jar server
-{div}
-
-Once the shell prompt appears, execute the following command in the shell:
+{div}</p>
+<p>Once the shell prompt appears, execute the following command in the shell:
 {div:class=shell}
 start file:../AdderServiceInterface/target/AdderServiceInterface-0.0.1-SNAPSHOT.jar
 start file:../AdderServiceProvider/target/AdderServiceProvider-0.0.1-SNAPSHOT.jar
-{div}
-
-At this point, the service should be available remotely (wait until the console stops printing
stuff), you can check this by obtaining the WSDL: [http://localhost:9090/adder?wsdl](http://localhost:9090/adder?wsdl)
-
-!wsdl.png|width=600px!
-
-## The Adder Service Consumer
-The service consumer is also created using iPOJO. Thanks to DOSGi, iPOJO can inject the service
as any regular OSGi service. So, the code is pretty simple:
+{div}</p>
+<p>At this point, the service should be available remotely (wait until the console
stops printing stuff), you can check this by obtaining the WSDL: <a href="http://localhost:9090/adder?wsdl">http://localhost:9090/adder?wsdl</a></p>
+<p>!wsdl.png|width=600px!</p>
+<h2 id="the-adder-service-consumer">The Adder Service Consumer</h2>
+<p>The service consumer is also created using iPOJO. Thanks to DOSGi, iPOJO can inject
the service as any regular OSGi service. So, the code is pretty simple:
 {code:java}
 @Component
-public class AdderConsumer {
-
-  @Requires
-  private AdderService adder;
-
-  public AdderConsumer() {
+public class AdderConsumer {</p>
+<p>@Requires
+  private AdderService adder;</p>
+<p>public AdderConsumer() {
     System.out.println("Using adder service: 1 + 1 = "+ adder.add(1, 1));
  }
-}
+}</p>
+<div class="codehilite"><pre><span class="n">This</span> <span
class="n">implementation</span> <span class="k">use</span> <span class="n">iPOJO</span>
<span class="n">field</span> <span class="n">injection</span> <span
class="n">to</span> <span class="n">receive</span> <span class="n">the</span>
<span class="n">AdderService</span><span class="o">.</span> <span
class="n">Then</span><span class="p">,</span> <span class="n">it</span>
<span class="n">uses</span> <span class="n">it</span> <span class="n">as</span>
<span class="n">a</span> <span class="n">regular</span> <span class="n">field</span><span
class="o">.</span> <span class="n">This</span> <span class="n">bundle</span>
<span class="n">also</span> <span class="n">contains</span> <span
class="n">a</span> <span class="p">[</span><span class="n">metadata</span><span
class="o">.</span><span class="n">xml</span><span class="o">|</span><span
class="n">http:</span><span class="sr">//s</span><span class="n">vn</span><span
class="
 o">.</span><span class="n">apache</span><span class="o">.</span><span
class="n">org</span><span class="sr">/repos/</span><span class="n">asf</span><span
class="sr">/felix/s</span><span class="n">andbox</span><span class="sr">/clement/i</span><span
class="n">pojo</span><span class="o">-</span><span class="n">tutorials</span><span
class="sr">/dosgi/</span><span class="n">AdderServiceConsumer</span><span
class="sr">/src/m</span><span class="n">ain</span><span class="sr">/resources/m</span><span
class="n">etadata</span><span class="o">.</span><span class="n">xml</span><span
class="p">]</span> <span class="n">file</span> <span class="n">declaring</span>
<span class="n">an</span> <span class="n">instance</span> <span
class="n">of</span> <span class="n">this</span> <span class="n">type</span>
<span class="n">without</span> <span class="n">any</span> <span
class="n">special</span> <span class="n">configuration:</span>
+<span class="p">{</span><span class="n">code:xml</span><span class="p">}</span>
+<span class="o">&lt;</span><span class="n">instance</span> <span
class="n">component</span><span class="o">=</span><span class="s">&quot;org.apache.felix.ipojo.remote.consumer.AdderConsumer&quot;</span><span
class="o">/&gt;</span>
+</pre></div>
+
+
+<p>However, now we have to tell to DOSGi to import our Adder service. To achieve that,
we create a very simple bundle that just contains the <a href="http://svn.apache.org/repos/asf/felix/sandbox/clement/ipojo-tutorials/dosgi/AdderServiceImporter/src/main/resources/OSGI-INF/remote-service/remote-services.xml">remote-services.xml</a>
file. This file is analyzed by CXF in order to import the service.</p>
+<div class="codehilite"><pre><span class="nt">&lt;service-descriptions</span>
<span class="na">xmlns=</span><span class="s">&quot;http://www.osgi.org/xmlns/sd/v1.0.0&quot;</span><span
class="nt">&gt;</span>
+  <span class="nt">&lt;service-description&gt;</span>
+    <span class="nt">&lt;provide</span> <span class="na">interface=</span><span
class="s">&quot;org.apache.cxf.dosgi.samples.ds.AdderService&quot;</span><span
class="nt">/&gt;</span>
+    <span class="nt">&lt;property</span> <span class="na">name=</span><span
class="s">&quot;osgi.remote.interfaces&quot;</span><span class="nt">&gt;</span>*<span
class="nt">&lt;/property&gt;</span>
+    <span class="nt">&lt;property</span> <span class="na">name=</span><span
class="s">&quot;osgi.remote.configuration.type&quot;</span><span class="nt">&gt;</span>pojo<span
class="nt">&lt;/property&gt;</span>
+    <span class="nt">&lt;property</span> <span class="na">name=</span><span
class="s">&quot;osgi.remote.configuration.pojo.address&quot;</span><span
class="nt">&gt;</span>http://localhost:9090/adder<span class="nt">&lt;/property&gt;</span>
+  <span class="nt">&lt;/service-description&gt;</span>
+<span class="nt">&lt;/service-descriptions&gt;</span>
+</pre></div>
 
-    This implementation use iPOJO field injection to receive the AdderService. Then, it uses
it as a regular field. This bundle also contains a [metadata.xml|http://svn.apache.org/repos/asf/felix/sandbox/clement/ipojo-tutorials/dosgi/AdderServiceConsumer/src/main/resources/metadata.xml]
file declaring an instance of this type without any special configuration:
-    {code:xml}
-    <instance component="org.apache.felix.ipojo.remote.consumer.AdderConsumer"/>
-
-However, now we have to tell to DOSGi to import our Adder service. To achieve that, we create
a very simple bundle that just contains the [remote-services.xml](http://svn.apache.org/repos/asf/felix/sandbox/clement/ipojo-tutorials/dosgi/AdderServiceImporter/src/main/resources/OSGI-INF/remote-service/remote-services.xml)
file. This file is analyzed by CXF in order to import the service.
-
-    <service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
-      <service-description>
-        <provide interface="org.apache.cxf.dosgi.samples.ds.AdderService"/>
-        <property name="osgi.remote.interfaces">*</property>
-        <property name="osgi.remote.configuration.type">pojo</property>
-        <property name="osgi.remote.configuration.pojo.address">http://localhost:9090/adder</property>
-      </service-description>
-    </service-descriptions>
 
-Now, let's start another instance of Felix:
+<p>Now, let's start another instance of Felix:
 {div:class=shell}
 java -jar bin/felix.jar client
 {div}
@@ -175,25 +297,24 @@ Then, execute the following command in t
 {div:class=shell}
 start file:../AdderServiceInterface/target/AdderServiceInterface-0.0.1-SNAPSHOT.jar
 start file:../AdderServiceConsumer/target/AdderServiceConsumer-0.0.1-SNAPSHOT.jar
-start file:../AdderServiceImporter/target/AdderServiceImporter-0.0.1-SNAPSHOT.jar
-
-... log messages may appear, after a little while the following message appears:
+start file:../AdderServiceImporter/target/AdderServiceImporter-0.0.1-SNAPSHOT.jar</p>
+<p>... log messages may appear, after a little while the following message appears:
 Using adder service: 1 + 1 = 2
-{div}
+{div}</p>
+<p>The remote adder service has now been invoked. You will see the following line on
the server side window:</p>
+<div class="codehilite"><pre><span class="n">Adder</span> <span
class="n">service</span> <span class="n">invoked:</span> <span class="mi">1</span>
<span class="o">+</span> <span class="mi">1</span> <span class="o">=</span>
<span class="mi">2</span>
+</pre></div>
 
-The remote adder service has now been invoked. You will see the following line on the server
side window:
 
-    Adder service invoked: 1 + 1 = 2
-
-That's it !
-
-## Conclusion
-
-This tutorial has illustrated how to easily create remote services and consume them with
iPOJO. Subscribe to the Felix users mailing list by sending a message to [mailto:users-subscribe@felix.apache.org]();
after subscribing, email questions or feedback to [mailto:users@felix.apache.org].
+<p>That's it !</p>
+<h2 id="conclusion">Conclusion</h2>
+<p>This tutorial has illustrated how to easily create remote services and consume them
with iPOJO. 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>
+      </div>
+      
+      <img src="http://felix.apache.org/ipojo/site/footer.png" class="footer">
 
-{include:apache-felix-ipojo-footer}
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1422427 by fmeschbe on Sun, 16 Dec 2012 00:36:51 +0000
+        Rev. 1441864 by fmeschbe on Sun, 3 Feb 2013 06:44:40 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project
@@ -201,5 +322,18 @@ This tutorial has illustrated how to eas
         may be trademarks or registered trademarks of their respective owners.
       </div>
     </div>
+    </div>
+    
+    <script type="text/javascript">
+    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+    </script>
+    <script type="text/javascript">
+    try{
+    var pageTracker = _gat._getTracker("UA-1518442-4");
+    pageTracker._trackPageview();
+    } catch(err) {}
+    </script>
+
   </body>
 </html>



Mime
View raw message