Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Setting up the Multi Bundle Distribution of CXF Distributed OSGi

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 DOSGi Releases page.

Setting up Felix

...

Verified with: Felix 1.8.0

In the distribution you will find a file called: .../conf/felix.config.properties.append. This file contains auto-start instructions for every bundle in the distribution.

  1. Simply copy the content of the whole file and append it to the conf/config.properties file of the Felix distribution.
  2. Fix the file:apache-cxf-dosgi-ri URLs in the file to point to where you have unzipped the distribution.
  3. Felix 1.8.0 has changed the startlevel property, which may need fixing in this file. Change from org.osgi.framework.startlevel=32 to org.osgi.framework.startlevel.beginning=32 (This step will not be needed in future releases of CXF/DOSGi).

At the end the conf/config.properties file looks like this:

(verified with 4.0.3)

Change directory to the felix framework main dir. Unpack the cxf dosgi distro there. Append the felix config from the distro to the felix config.properties. Start felix.

Code Block

tar -xzvf 
Code Block
... existing lines ...
org.ops4j.pax.web.session.timeout=30
org.osgi.framework.startlevel.beginning=81
felix.auto.start.50=http://repo2.maven.org/maven2/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar
    
felix.auto.start.51=file:///c:/apache-cxf-dosgi-ri-multibundle-distribution-1.1/dosgi_bundles/geronimo-annotation_1.0_spec-1.1.1.jar
felix.auto.start.52=file:///c:/4-SNAPSHOT-dir.tar.gz
cat apache-cxf-dosgi-ri-1.1/dosgi_bundles/geronimo-activation_1.1_spec-1.0.2.jar
... and so on ...

Now start Felix:

Code Block
.../felix-1.8.0> 4-SNAPSHOT/conf/felix.config.properties.append >> conf/config.properties
java -jar bin/felix.jar

Welcome to Felix.
=================
... some log messages may appear ...
-> ps
START LEVEL 81
   ID   State         Level  Name
[   0] [Active     ] [    0] System 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)

Setting up Equinox

...

Verify that all bundles are in state Active. There should be no exceptions in the logs.

Setting up Eclipse Equinox (verified with Equinox 3.6.2)

In the distribution you will find a file called: .../conf/equinox.config.ini.append. This file contains auto-start instructions for every bundle in the distribution.

...

Code Block
org.ops4j.pax.web.session.timeout=30
osgi.bundles=org.eclipse.osgi.services@start, \
c:/apache-cxf-dosgi-ri-1.03/dosgi_bundles/geronimo-annotation_1.0_spec-1.1.1.jar@start, c:/apache-cxf-dosgi-ri-1.03/dosgi_bundles/geronimo-activation_1.1_spec-1.0.2.jar@start, 
... and so on ...

Now start Equinox :and verify that all bundles are in state Active

Code Block
.../eclipse> 
java -jar plugins/org.eclipse.osgi_3.56.02.v20090520R36x_v20110210.jar -console -configuration dosgi_conf
... some log messages may appear ...
osgi> 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

In both cases install the greeter demo to check if services are exported correctly