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
(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 cxf-dosgi-ri-multibundle-distribution-1.4-SNAPSHOT-dir.tar.gz
cat apache-cxf-dosgi-ri-1.4-SNAPSHOT/conf/felix.config.properties.append >> conf/config.properties
java -jar bin/felix.jar
|
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/felixequinox.config.propertiesini.append
. This file contains auto-start instructions for every bundle in the distribution.
- Simply copy Create a directory in the Equinox installation, e.g.
dosgi_conf
and create a file calledconfig.ini
in this directory with the content of the whole file and append it to theconf/config.properties
file of the Felix distributionequinox.config.ini.append
file. - Fix the
file:../apache-cxf-dosgi-ri
URLs path locations in the file to point to where you have unzipped the distributionFelix 1.8.0 has changed the startlevel property, which may need fixing in this file. Change fromorg.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 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
Setting up Equinox
...