Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The service implementation providers a simplistic implementation of the AdderService interface, which is instantiated as a DS component.

In the OSGI-INF/component.xml file the AdderServiceImpl is instantiated and registered with the OSGi service registry with the distribution properties. These properties instruct. Distributed OSGi into making the service available on http://localhost:9090/adderImage Added.

Code Block
xml
xml
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
  <implementation class="org.apache.cxf.dosgi.samples.ds.impl.AdderServiceImpl"/>
  
  <property name="osgi.remote.interfaces">*</property>
  <property name="osgi.remote.configuration.type" value="pojo" />
  <property name="osgi.remote.configuration.pojo.address" value="http://localhost:9090/adder" />
  
  <service>
    <provide interface="org.apache.cxf.dosgi.samples.ds.AdderService"/>
  </service>
</scr:component>

So let's install the server side in Equinox, together with the Equinox DS implementation. You can do this from the Equinox command line, but in this document I'll launch Equinox from within Eclipse.
I'm starting off by importing the Single Bundle Distribution as a binary project in Eclipse by going File -> Import | Plug-ins and Fragments and then I select the directory that contains the single bundle distribution JAR file. My workspace now looks like this:
@@@ image
Next I'll create an OSGi Framework launch configuration that includes DS.

The Adder Service Consumer