cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache CXF > Distributed OSGi
Date Sun, 04 Nov 2012 15:47:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/15/_/styles/combined.css?spaceKey=CXF&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CXF/Distributed+OSGi">Distributed
OSGi</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~christian%2Bschneider">Christian
Schneider</a>
    </h4>
        <br/>
                         <h4>Changes (6)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >The Apache CXF Distributed OSGi subproject
provides the Reference Implementation of the Distribution Provider component of the OSGi Remote
Services Specification (Chapter 13 in the [OSGi 4.2 Compendium Specification|http://www.osgi.org/Download/Release4V42]).
<br></td></tr>
            <tr><td class="diff-changed-lines" >It implements the Remote Services
functionality using Web Services, leveraging SOAP over HTTP and exposing the Service over
a WSDL contract. Starting from version 1.1, Java interfaces can also be exposed and consumed
as RESTful JAX-RS services. <span class="diff-added-words"style="background-color: #dfd;">The
1.2 version of this project is also the Reference Implementation of the OSGi Remote Service
Admin specification, chapter 122 in the [OSGi 4.2 Enterprise Specification|http://www.osgi.org/Download/Release4V42]).</span>
<br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">The
1.2 version of this project is also the Reference Implementation of the OSGi Remote Service
Admin specification, chapter 122 in the [OSGi 4.2 Enterprise Specification|http://www.osgi.org/Download/Release4V42]).
<br> <br></td></tr>
            <tr><td class="diff-unchanged" >This page is about getting started
and the demos, *further links*: <br>* [Distributed OSGi Reference] guide <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">*
[DOSGi Architecture] <br></td></tr>
            <tr><td class="diff-unchanged" >* [DOSGi Presentations and Articles]
<br>* [DOSGi Releases] <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>To get started, get yourself
a CXF-DOSGi distribution. The following distributions are available: <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">*
*Multi Bundle Distribution*: This distribution is a zip file containing the Distributed OSGi
bundles, as well as all their dependencies. <br>* *Single Bundle Distribution*: This
is a convenience distribution of a single bundle that embeds all the dependencies. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">*
[Apache Karaf Feature] : Allows installation in Apache Karaf using the feature commands (Available
as of CXF-DOSGi 1.4.0) <br>* [Multi Bundle Distribution]: Zip file containing the Distributed
OSGi bundles, as well as all their dependencies <br>* [Single Bundle Distribution]:
Convenience distribution of a single bundle that embeds all the dependencies <br></td></tr>
            <tr><td class="diff-unchanged" > <br>Which distribution to take?
That depends on what you are doing. The single-bundle distribution is a really convenient
way of getting started as it provides all of Distributed OSGi plus its dependencies in one.
 <br>The multi-bundle distribution is obviously a little more work to install, but the
fine-grained bundles do have an extra benefit: they allow sharing. So if your application
depends on one or more of the library bundles, it can use them from the multi-bundle distribution.
Similarly, the multi-bundle distribution makes it possible to update the dependency bundles
- if compatible - without having to replace the Distributed OSGi bundles. <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Get
a distribution by: <br>* Downloading a built distribution. See the [DOSGi Releases]
page. <br>* Alternatively, built the distribution yourself. See the [DOSGi Build] page.
<br> <br>h3. Setting up your OSGi container <br>Setting up the single-bundle
distribution is really simple, see below. For instructions on setting up the multi-bundle
distribution see the [Multi Bundle Setup|DOSGi Multi Bundle Setup] page. <br> <br>*Prerequisites
for the single-bundle distribution:* <br> <br>The single-bundle distribution requires
some of the interfaces of the OSGi compendium specification. These are provided with the Equinox
and Felix OSGi distributions, but not installed by default. <br> <br>h4. Setting
up Felix <br> <br>The compendium interfaces can be downloaded from the following
various places, the easiest is probably from Maven Central, for example:  <br>&quot;g!
install http://repo1.maven.org/maven2/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar&quot;.
<br>(*Note*: this step is not required for DOSGI RI 1.3) <br> <br> <br>To
set up Felix you can follow these steps: <br>_Verified with: Felix 4.0.2 and DOSGI RI
1.3_ <br>{code}../felix-4.0.2&gt; java -jar bin/felix.jar <br> <br>Welcome
to Apache Felix Gogo <br>g! start http://www.apache.org/dist/cxf/dosgi/1.3/cxf-dosgi-ri-singlebundle-distribution-1.3.jar
<br>... some log messages may appear... <br>g! lb <br>    0|Active     |
   0|org.apache.felix.framework (4.0.2) <br>    1|Active     |    1|org.apache.felix.bundlerepository
(1.6.6) <br>    2|Active     |    1|org.apache.felix.gogo.command (0.12.0) <br>
   3|Active     |    1|org.apache.felix.gogo.runtime (0.10.0) <br>    4|Active     |
   1|org.apache.felix.gogo.shell (0.10.0) <br>    5|Active     |    1|cxf-dosgi-ri-singlebundle-distribution
(1.3.0){code} <br> <br>However, you can also change the {{conf/config.properties}}
file to automatically load these bundles. This approach is described in the [Multi Bundle
Setup|DOSGi Multi Bundle Setup] page. <br> <br>h4. Setting up Equinox <br>The
compendium interfaces are part of the Equinox/Eclipse distribution and can be found in a file
called plugins/org.eclipse.osgi.services_3.2.0.v20090520-1800.jar (the timestamp could vary),
for example: <br>&quot;osgi&gt; install file:plugins/org.eclipse.osgi.services_3.2.100.v20100503.jar&quot;
<br>(*Note*: this step is not required for DOSGI RI 1.3) <br> <br>To set
up Equinox you can follow these steps: <br>_Verified with: Eclipse 3.6.2_ <br>{code}.../eclipse&gt;
java -jar plugins/org.eclipse.osgi_3.6.2.R36x_v20110210.jar -console <br> <br>osgi&gt;
install http://www.apache.org/dist/cxf/dosgi/1.3/cxf-dosgi-ri-singlebundle-distribution-1.3.jar
<br>Bundle id is 1 <br> <br>osgi&gt; start 1 <br>... some log
messages may appear... <br>osgi&gt; ss <br> <br>Framework is launched.
<br> <br>id      State       Bundle <br>0       ACTIVE      org.eclipse.osgi_3.6.2.R36x_v20110210
<br>1       ACTIVE      cxf-dosgi-ri-singlebundle-distribution_1.3.0{code} <br>
<br>However, you can also create a {{config.ini}} file to automatically load these bundles.
This approach is described in the [Multi Bundle Setup|DOSGi Multi Bundle Setup] page. <br>
<br>h4. Using Equinox from within the Eclipse IDE <br>_This option is really handy
for debugging. Verified with: Eclipse 3.5M4_ <br>[Setting up Eclipse for Running and
Debugging Distributed OSGi] <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h3. Setting up CXF/DOSGi Discovery
<br>See the [DOSGi Discovery] page and the [DOSGi Discovery Demo page]. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>The Apache CXF Distributed OSGi subproject provides the Reference Implementation
of the Distribution Provider component of the OSGi Remote Services Specification (Chapter
13 in the <a href="http://www.osgi.org/Download/Release4V42" class="external-link" rel="nofollow">OSGi
4.2 Compendium Specification</a>).<br/>
It implements the Remote Services functionality using Web Services, leveraging SOAP over HTTP
and exposing the Service over a WSDL contract. Starting from version 1.1, Java interfaces
can also be exposed and consumed as RESTful JAX-RS services. The 1.2 version of this project
is also the Reference Implementation of the OSGi Remote Service Admin specification, chapter
122 in the <a href="http://www.osgi.org/Download/Release4V42" class="external-link" rel="nofollow">OSGi
4.2 Enterprise Specification</a>).</p>

<p>This page is about getting started and the demos, <b>further links</b>:</p>
<ul>
	<li><a href="/confluence/display/CXF/Distributed+OSGi+Reference" title="Distributed
OSGi Reference">Distributed OSGi Reference</a> guide</li>
	<li><a href="/confluence/display/CXF/DOSGi+Architecture" title="DOSGi Architecture">DOSGi
Architecture</a></li>
	<li><a href="/confluence/display/CXF/DOSGi+Presentations+and+Articles" title="DOSGi
Presentations and Articles">DOSGi Presentations and Articles</a></li>
	<li><a href="/confluence/display/CXF/DOSGi+Releases" title="DOSGi Releases">DOSGi
Releases</a></li>
	<li><a href="/confluence/display/CXF/DOSGi+Build" title="DOSGi Build">DOSGi Build</a>
page</li>
	<li><a href="/confluence/display/CXF/DOSGi+FAQ" title="DOSGi FAQ">DOSGi FAQ</a>
page</li>
</ul>


<h2><a name="DistributedOSGi-GettingStarted"></a>Getting Started</h2>

<p>To get started, get yourself a CXF-DOSGi distribution. The following distributions
are available:</p>
<ul>
	<li><a href="/confluence/pages/createpage.action?spaceKey=CXF&amp;title=Apache+Karaf+Feature&amp;linkCreation=true&amp;fromPageId=105477"
class="createlink">Apache Karaf Feature</a> : Allows installation in Apache Karaf
using the feature commands (Available as of CXF-DOSGi 1.4.0)</li>
	<li><a href="/confluence/pages/createpage.action?spaceKey=CXF&amp;title=Multi+Bundle+Distribution&amp;linkCreation=true&amp;fromPageId=105477"
class="createlink">Multi Bundle Distribution</a>: Zip file containing the Distributed
OSGi bundles, as well as all their dependencies</li>
	<li><a href="/confluence/pages/createpage.action?spaceKey=CXF&amp;title=Single+Bundle+Distribution&amp;linkCreation=true&amp;fromPageId=105477"
class="createlink">Single Bundle Distribution</a>: Convenience distribution of a
single bundle that embeds all the dependencies</li>
</ul>


<p>Which distribution to take? That depends on what you are doing. The single-bundle
distribution is a really convenient way of getting started as it provides all of Distributed
OSGi plus its dependencies in one. <br/>
The multi-bundle distribution is obviously a little more work to install, but the fine-grained
bundles do have an extra benefit: they allow sharing. So if your application depends on one
or more of the library bundles, it can use them from the multi-bundle distribution. Similarly,
the multi-bundle distribution makes it possible to update the dependency bundles - if compatible
- without having to replace the Distributed OSGi bundles.</p>

<h3><a name="DistributedOSGi-SettingupCXF%2FDOSGiDiscovery"></a>Setting
up CXF/DOSGi Discovery</h3>
<p>See the <a href="/confluence/display/CXF/DOSGi+Discovery" title="DOSGi Discovery">DOSGi
Discovery</a> page and the <a href="/confluence/display/CXF/DOSGi+Discovery+Demo+page"
title="DOSGi Discovery Demo page">DOSGi Discovery Demo page</a>.</p>

<h2><a name="DistributedOSGi-TheSamples"></a>The Samples</h2>
<p>The samples directory contains these sample projects:</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Sample </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Doc Page </th>
</tr>
<tr>
<td class='confluenceTd'> <b>greeter</b> </td>
<td class='confluenceTd'> a very simple demo of a Greeter OSGi Service exposed remotely
and a Consumer invoking on it. </td>
<td class='confluenceTd'> <a href="/confluence/display/CXF/Distributed+OSGi+Greeter+Demo+Walkthrough"
title="Distributed OSGi Greeter Demo Walkthrough">Walkthrough of the Greeter Demo </a>
</td>
</tr>
<tr>
<td class='confluenceTd'> <b>greeter_rest</b> </td>
<td class='confluenceTd'> a very simple demo of a Greeter OSGi Service exposed remotely
as a RESTful service and a Consumer invoking on it. Virtually identical to a greeter sample
</td>
<td class='confluenceTd'> <a href="/confluence/display/CXF/Distributed+OSGi+Greeter+Demo+Walkthrough"
title="Distributed OSGi Greeter Demo Walkthrough">Walkthrough of the Greeter Demo </a>
</td>
</tr>
<tr>
<td class='confluenceTd'> <b>spring_dm</b> </td>
<td class='confluenceTd'> a demo created using Spring-DM. Rather than invoking on the
OSGi API's directly, the Spring-DM demo shows how you can use Spring to configure your beans
as OSGi Services and similarly how to use Spring-DM to invoke a (remote) OSGi Service. </td>
<td class='confluenceTd'> <a href="/confluence/display/CXF/DOSGi+Spring-DM+Demo+page"
title="DOSGi Spring-DM Demo page">DOSGi Spring&#45;DM Demo page</a> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>ds</b> </td>
<td class='confluenceTd'> this demo shows how Distributed OSGi can be used with OSGi
Declarative Services (DS). </td>
<td class='confluenceTd'> <a href="/confluence/display/CXF/DOSGi+DS+Demo+page" title="DOSGi
DS Demo page">DOSGi DS Demo page</a> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>discovery</b> </td>
<td class='confluenceTd'> this demo shows how to use Distributed OSGi with a dynamic
Discovery system such as the one based on Zookeeper that comes with CXF/DOSGi. </td>
<td class='confluenceTd'> <a href="/confluence/display/CXF/DOSGi+Discovery+Demo+page"
title="DOSGi Discovery Demo page">DOSGi Discovery Demo page</a> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>iPOJO</b> </td>
<td class='confluenceTd'> this demo shows how Distributed OSGi can be used with iPOJO
</td>
<td class='confluenceTd'> <a href="http://felix.apache.org/site/apache-felix-ipojo-dosgi.html"
class="external-link" rel="nofollow">DOSGi iPOJO Demo page</a> </td>
</tr>
</tbody></table>
</div>


<p>The samples can be installed directly from the maven release repository (as described
in the demo documentation pages), but you can also build them yourself.<br/>
To build the samples from source:</p>
<ol>
	<li>simply check out the DOSGi trunk from SVN (<a href="http://svn.apache.org/repos/asf/cxf/dosgi/trunk"
class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/cxf/dosgi/trunk</a>)</li>
	<li>go into the <tt>samples</tt> directory</li>
	<li>and build them using <tt>mvn install</tt></li>
</ol>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CXF/Distributed+OSGi">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=105477&revisedVersion=63&originalVersion=62">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CXF/Distributed+OSGi?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message