Versions Compared

Key

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

...

This demo can be used with any DOSGi distribution, in this document the single-bundle distribution is used with the Equinox implementation of DS.

Demo design

This demo is quite similar to the Spring-DM demo and the Greeter demo in structure. It consists of 3 bundles:

  • An interface bundle defining the Adder Service interface.
  • An Adder Service implementation bundle.
  • An Adder Service consumer bundle.

The service implementation and consumer bundle are built using DS.
@@@@ image
The Adder Service interface is as follows:

Code Block
java
java
public interface AdderService {
    int add(int a, int b);
}

The Adder Service Implementation

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

The Adder Service Consumer