The Apache CXF Distributed OSGi subproject provides the Reference Implementation of the Distribution Provider component of the OSGi Remote Services Specification (Chapter 13 in the OSGi 4.2 Compendium Specification).
It implements the Remote Services functionality using Web Services, leveraging SOAP over HTTP and exposing the Service over a WSDL contract. Starting from version 1.1, Java interfaces can also be exposed and consumed as RESTful JAX-RS services. The 1.2 version of this project is also the Reference Implementation of the OSGi Remote Service Admin specification, chapter 122 in the OSGi 4.2 Enterprise Specification).
This page is about getting started and the demos, further links:
To get started, get yourself a CXF-DOSGi distribution. The following distributions are available:
Which distribution to take? That depends on what you are doing. The single-bundle distribution is a really convenient way of getting started as it provides all of Distributed OSGi plus its dependencies in one.
The multi-bundle distribution is obviously a little more work to install, but the fine-grained bundles do have an extra benefit: they allow sharing. So if your application depends on one or more of the library bundles, it can use them from the multi-bundle distribution. Similarly, the multi-bundle distribution makes it possible to update the dependency bundles - if compatible - without having to replace the Distributed OSGi bundles.
Setting up CXF/DOSGi Discovery
See the DOSGi Discovery page and the DOSGi Discovery Demo page.
The samples directory contains these sample projects:
Greeter OSGi Service exposed remotely and a Consumer invoking on it.
Greeter OSGi Service exposed remotely as a RESTful service and a Consumer invoking on it. Virtually identical to a greeter sample
Shows how you can use Spring DM to export your beans as OSGi Services and similarly how to use Spring-DM to inject a (remote) OSGi Service.
Shows how Distributed OSGi can be used with OSGi Declarative Services (DS).
Shows how to use Distributed OSGi with a dynamic Discovery system such as the one based on Zookeeper that comes with CXF/DOSGi.
Shows how Distributed OSGi can be used with iPOJO
The samples can be installed directly from the maven release repository (as described in the demo documentation pages), but you can also build them yourself.
To build the samples from source:
- simply check out the DOSGi trunk from SVN (http://svn.apache.org/repos/asf/cxf/dosgi/trunk)
- go into the
- and build them using