cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache CXF > DOSGi Multi Bundle Setup
Date Fri, 04 Dec 2009 15:08:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/11/_/styles/combined.css?spaceKey=CXF&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/CXF/DOSGi+Multi+Bundle+Setup">DOSGi
Multi Bundle Setup</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~davidb@apache.org">David
Bosschaert</a>
    </h4>
     Update to 1.1
          <div id="versionComment" class="noteMacro" style="display:none; padding: 5px;">
     Update to 1.1<br />
     </div>
          <br/>
     <div class="notificationGreySide">
         <h1><a name="DOSGiMultiBundleSetup-SettinguptheMultiBundleDistributionofCXFDistributedOSGi"></a>Setting
up the Multi Bundle Distribution of CXF Distributed OSGi</h1>
<p>The multi-bundle distribution of CXF/DOSGi contains all the DOSGi bundles plus their
dependencies as individual bundles. While the single-bundle distribution is certainly easier
to get started with, the multi-bundle distro is more flexible wrt to sharing bundles and updating
dependencies. To obtain a multi bundle distribution see the <a href="/confluence/display/CXF/DOSGi+Releases"
title="DOSGi Releases">DOSGi Releases</a> page.</p>

<h2><a name="DOSGiMultiBundleSetup-SettingupFelix"></a>Setting up Felix</h2>
<p><em>Verified with: Felix 1.8.0</em></p>

<p>In the distribution you will find a file called: <tt>.../conf/felix.config.properties.append</tt>.
This file contains auto-start instructions for every bundle in the distribution.</p>
<ol>
	<li>Simply copy the content of the whole file and append it to the <tt>conf/config.properties</tt>
file of the Felix distribution.</li>
	<li>Fix the <tt><a href="file:apache-cxf-dosgi-ri" rel="nofollow">file:apache-cxf-dosgi-ri</a></tt>
URLs in the file to point to where you have unzipped the distribution.</li>
	<li>Felix 1.8.0 has changed the startlevel property, which may need fixing in this
file. Change from <tt>org.osgi.framework.startlevel=32</tt> to <tt>org.osgi.framework.startlevel.beginning=32</tt>
(This step will not be needed in future releases of CXF/DOSGi).</li>
</ol>


<p>At the end the <tt>conf/config.properties</tt> file looks like this:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">... existing lines ...
org.ops4j.pax.web.session.timeout=30
org.osgi.framework.startlevel.beginning=81
felix.auto.start.50=http:<span class="code-comment">//repo2.maven.org/maven2/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar
</span>    
felix.auto.start.51=file:<span class="code-comment">///c:/apache-cxf-dosgi-ri-1.1/dosgi_bundles/geronimo-annotation_1.0_spec-1.1.1.jar
</span>felix.auto.start.52=file:<span class="code-comment">///c:/apache-cxf-dosgi-ri-1.1/dosgi_bundles/geronimo-activation_1.1_spec-1.0.2.jar
</span>... and so on ...
</pre>
</div></div>
<p>Now start Felix:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">.../felix-1.8.0&gt; java -jar bin/felix.jar

Welcome to Felix.
=================
... some log messages may appear ...
-&gt; ps
START LEVEL 81
   ID   State         Level  Name
[   0] [Active     ] [    0] <span class="code-object">System</span> Bundle (1.8.0)
[   1] [Active     ] [   53] geronimo-javamail_1.4_spec (1.2)
[   2] [Active     ] [   52] geronimo-activation_1.1_spec (1.0.2)
[   3] [Active     ] [   51] geronimo-annotation_1.0_spec (1.1.1)
[   4] [Active     ] [   50] osgi.compendium (4.1.0.build-200702212030)
[   5] [Active     ] [   81] CXF Distributed Software Bundle (1.1)
[   6] [Active     ] [   80] CXF Local Discovery Service Bundle (1.1)
[   7] [Active     ] [   79] Apache ServiceMix Specs :: JSR311 API 1.0 (1.3.0)
[   8] [Active     ] [   78] Apache ServiceMix Specs :: JAXWS API 2.1 (1.3.0)
[   9] [Active     ] [   77] Apache ServiceMix Specs :: JAXB API 2.1 (1.3.0)
[  10] [Active     ] [   76] Apache ServiceMix Specs :: STAX API 1.0 (1.3.0)
[  11] [Active     ] [   75] Apache ServiceMix Specs :: SAAJ API 1.3 (1.3.0)
[  12] [Active     ] [   74] Apache CXF Minimal Bundle Jar (2.2.4)
[  13] [Active     ] [   73] Apache ServiceMix Bundles: woodstox-3.2.7 (3.2.7.1)
[  14] [Active     ] [   72] Apache ServiceMix Bundles: neethi-2.0.4 (2.0.4.1)
[  15] [Active     ] [   71] Apache ServiceMix Bundles: xmlresolver-1.2 (1.2.0.1)
[  16] [Active     ] [   70] Apache ServiceMix Bundles: asm-2.2.3 (2.2.3.1)
[  17] [Active     ] [   69] Apache ServiceMix Bundles: xmlschema-1.4.3 (1.4.3.1)
[  18] [Active     ] [   68] Apache ServiceMix Bundles: xmlsec-1.3.0 (1.3.0.1)
[  19] [Active     ] [   67] Apache ServiceMix Bundles: wsdl4j-1.6.1 (1.6.1.1)
[  20] [Active     ] [   66] Apache ServiceMix Bundles: jaxb-impl-2.1.6 (2.1.6.1)
[  21] [Active     ] [   65] OPS4J Pax Web - Service (0.5.1)
[  22] [Active     ] [   64] spring-osgi-extender (1.2.0)
[  23] [Active     ] [   63] spring-osgi-core (1.2.0)
[  24] [Active     ] [   62] spring-osgi-io (1.2.0)
[  25] [Active     ] [   61] Spring AOP (2.5.6)
[  26] [Active     ] [   60] AOP Alliance API (1.0.0)
[  27] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
[  28] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
[  29] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
[  30] [Active     ] [   59] Spring Context (2.5.6)
[  31] [Active     ] [   58] Spring Beans (2.5.6)
[  32] [Active     ] [   57] Spring Core (2.5.6)
[  33] [Active     ] [   56] JDOM DOM Processor (1.0.0)
[  34] [Active     ] [   55] Apache Commons Logging (1.1.1)
[  35] [Active     ] [   54] geronimo-ws-metadata_2.0_spec (1.1.2)
</pre>
</div></div>

<h2><a name="DOSGiMultiBundleSetup-SettingupEquinox"></a>Setting up Equinox</h2>
<p><em>Verified with: Eclipse/Equinox 3.5 RC 3</em></p>

<p>In the distribution you will find a file called: <tt>.../conf/equinox.config.ini.append</tt>.
This file contains auto-start instructions for every bundle in the distribution.</p>
<ol>
	<li>Create a directory in the Equinox installation, e.g. <tt>dosgi_conf</tt>
and create a file called <tt>config.ini</tt> in this directory with the content
of the <tt>equinox.config.ini.append</tt> file.</li>
	<li>Fix the <tt>../apache-cxf-dosgi-ri</tt> path locations in the file
to point to where you have unzipped the distribution.</li>
</ol>


<p>At the end the <tt>dosgi_conf/config.ini</tt> file looks like this:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">org.ops4j.pax.web.session.timeout=30
osgi.bundles=org.eclipse.osgi.services@start, \
c:/apache-cxf-dosgi-ri-1.0/dosgi_bundles/geronimo-annotation_1.0_spec-1.1.1.jar@start, c:/apache-cxf-dosgi-ri-1.0/dosgi_bundles/geronimo-activation_1.1_spec-1.0.2.jar@start,

... and so on ...</pre>
</div></div>
<p>Now start Equinox:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">.../eclipse&gt; java -jar plugins/org.eclipse.osgi_3.5.0.v20090520.jar
-console -configuration dosgi_conf
... some log messages may appear ...
osgi&gt; ss

Framework is launched.

id      State       Bundle
0       ACTIVE      org.eclipse.osgi_3.5.0.v20090520
1       ACTIVE      org.eclipse.osgi.services_3.2.0.v20090520-1800
2       ACTIVE      org.apache.geronimo.specs.geronimo-annotation_1.0_spec_1.1.1
3       ACTIVE      org.apache.geronimo.specs.geronimo-activation_1.1_spec_1.0.2
4       ACTIVE      org.apache.geronimo.specs.geronimo-javamail_1.4_spec_1.2.0
5       ACTIVE      org.apache.geronimo.specs.geronimo-ws-metadata_2.0_spec_1.1.2
6       ACTIVE      com.springsource.org.apache.commons.logging_1.1.1
7       ACTIVE      com.springsource.org.jdom_1.0.0
8       ACTIVE      org.springframework.core_2.5.6
9       ACTIVE      org.springframework.beans_2.5.6
10      ACTIVE      org.springframework.context_2.5.6
11      ACTIVE      com.springsource.org.aopalliance_1.0.0
12      ACTIVE      org.springframework.aop_2.5.6
13      ACTIVE      org.springframework.osgi.io_1.2.0
14      ACTIVE      org.springframework.osgi.core_1.2.0
15      ACTIVE      org.springframework.osgi.extender_1.2.0
16      ACTIVE      org.ops4j.pax.web.service_0.5.1
17      ACTIVE      org.apache.servicemix.bundles.jaxb-impl_2.1.6.1
18      ACTIVE      org.apache.servicemix.bundles.wsdl4j_1.6.1.1
19      ACTIVE      org.apache.servicemix.bundles.xmlsec_1.3.0.1
20      ACTIVE      org.apache.servicemix.bundles.xmlschema_1.4.3.1
21      ACTIVE      org.apache.servicemix.bundles.asm_2.2.3.1
22      ACTIVE      org.apache.servicemix.bundles.xmlresolver_1.2.0.1
23      ACTIVE      org.apache.servicemix.bundles.neethi_2.0.4.1
24      ACTIVE      org.apache.servicemix.bundles.woodstox_3.2.7.1
25      ACTIVE      org.apache.cxf.bundle-minimal_2.2.1
26      ACTIVE      org.apache.servicemix.specs.saaj-api-1.3_1.1.1
27      ACTIVE      org.apache.servicemix.specs.stax-api-1.0_1.1.1
28      ACTIVE      org.apache.servicemix.specs.jaxb-api-2.1_1.1.1
29      ACTIVE      org.apache.servicemix.specs.jaxws-api-2.1_1.1.1
30      ACTIVE      cxf-dosgi-ri-discovery-local_1.0.0
31      ACTIVE      cxf-dosgi-ri-dsw-cxf_1.0.0
</pre>
</div></div>
     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/CXF/DOSGi+Multi+Bundle+Setup">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=119315&revisedVersion=6&originalVersion=5">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CXF/DOSGi+Multi+Bundle+Setup?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message