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 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.
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 you will find a file called:
.../conf/equinox.config.ini.append. This file contains auto-start instructions for every bundle in the distribution.
- 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
- 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:
... and so on ...
Now start Equinox and verify that all bundles are in state Active
java -jar plugins/org.eclipse.osgi_3.6.2.R36x_v20110210.jar -console -configuration dosgi_conf
In both cases install the greeter demo to check if services are exported correctly