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=32
felix.auto.start.2=http://www.apache.org/dist/felix/org.osgi.compendium-1.2.0.jar
    
felix.auto.start.3=file:///c:/apache-cxf-dosgi-ri-multibundle-distribution-1.0/dosgi_bundles/geronimo-annotation_1.0_spec-1.1.1.jar
felix.auto.start.4=file:///c:/4-SNAPSHOT-dir.tar.gz
cat apache-cxf-dosgi-ri-1.0/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 32
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.8.0)
[   1] [Active     ] [   21] Apache ServiceMix Bundles: xmlschema-1.4.3 (1.4.3.1)
[   2] [Active     ] [   20] Apache ServiceMix Bundles: xmlsec-1.3.0 (1.3.0.1)
[   3] [Active     ] [   19] Apache ServiceMix Bundles: wsdl4j-1.6.1 (1.6.1.1)
[   4] [Active     ] [   18] Apache ServiceMix Bundles: jaxb-impl-2.1.6 (2.1.6.1)
[   5] [Active     ] [   17] OPS4J Pax Web - Service (0.5.1)
[   6] [Active     ] [   16] spring-osgi-extender (1.2.0)
[   7] [Active     ] [   15] spring-osgi-core (1.2.0)
[   8] [Active     ] [   14] spring-osgi-io (1.2.0)
[   9] [Active     ] [   13] Spring AOP (2.5.6)
[  10] [Active     ] [   12] AOP Alliance API (1.0.0)
[  11] [Active     ] [   11] Spring Context (2.5.6)
[  12] [Active     ] [   10] Spring Beans (2.5.6)
[  13] [Active     ] [   32] CXF Distributed Software Bundle (1.0)
[  14] [Active     ] [   31] CXF Local Discovery Service Bundle (1.0)
[  15] [Active     ] [   30] Apache ServiceMix Specs :: JAXWS API 2.1 (1.1.1)
[  16] [Active     ] [    9] Spring Core (2.5.6)
[  17] [Active     ] [    8] JDOM DOM Processor (1.0.0)
[  18] [Active     ] [    7] Apache Commons Logging (1.1.1)
[  19] [Active     ] [    6] geronimo-ws-metadata_2.0_spec (1.1.2)
[  20] [Active     ] [    5] geronimo-javamail_1.4_spec (1.2)
[  21] [Active     ] [    4] geronimo-activation_1.1_spec (1.0.2)
[  22] [Active     ] [    3] geronimo-annotation_1.0_spec (1.1.1)
[  23] [Active     ] [    2] OSGi R4 Compendium Bundle (4.1.0)
[  24] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
[  25] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
[  26] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
[  27] [Active     ] [   29] Apache ServiceMix Specs :: JAXB API 2.1 (1.1.1)
[  28] [Active     ] [   28] Apache ServiceMix Specs :: STAX API 1.0 (1.1.1)
[  29] [Active     ] [   27] Apache ServiceMix Specs :: SAAJ API 1.3 (1.1.1)
[  30] [Active     ] [   26] Apache CXF Minimal Bundle Jar (2.2.1)
[  31] [Active     ] [   25] Apache ServiceMix Bundles: woodstox-3.2.7 (3.2.7.1)
[  32] [Active     ] [   24] Apache ServiceMix Bundles: neethi-2.0.4 (2.0.4.1)
[  33] [Active     ] [   23] Apache ServiceMix Bundles: xmlresolver-1.2 (1.2.0.1)
[  34] [Active     ] [   22] Apache ServiceMix Bundles: asm-2.2.3 (2.2.3.1)

Setting up Equinox

Verified with: Eclipse/Equinox 3.5 RC 3

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 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.

  1. Create a directory in the Equinox installation, e.g. dosgi_conf and create a file called config.ini in this directory with the content of the equinox.config.ini.append file.
  2. Fix the ../apache-cxf-dosgi-ri path locations in the file to point to where you have unzipped the distribution.

At the end the dosgi_conf/config.ini file looks like this:

Code Block
org.ops4j.pax.web.session.timeout=30
osgi.bundles=org.eclipse.osgi.services@start, \
c:/apache-cxf-dosgi-ri-1.

...

3/dosgi_bundles/geronimo-annotation_1.0_spec-1.1.1.jar@start, c:/apache-cxf-dosgi-ri-1.

...

3/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

...


java -jar plugins/org.eclipse.osgi_3.

...

6.

...

2.

...

R36x_v20110210.jar -console -configuration dosgi_conf

...

osgi> ss

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