...
Code Block | ||||
---|---|---|---|---|
| ||||
public interface GreeterService { Map<GreetingPhrase, String> greetMe(String name); GreetingPhrase [] greetMe(GreeterData name) throws GreeterException; } |
The GreeterData
interface, GreetingPhase
and GreeterException
classes are also defined by this custom types defined in the Greeter Interface bundle.
In this walkthrough, the following setup will be used:
The client side bundles will be running in Equinox, invoking on a Distributed OSGi Service running in Felix. Note that the choice of containers is completely trivial. Any OSGi container that implements the Service Registry Hooks (a new feature in OSGi 4.2) can be used on either side.
...
Some log messages may come up now.
Note that instead of manually adding these bundles to the Felix container, you can also append the target/felix.config.properties.append
file to the <felix-root>/conf/config.properties file. This will automatically load these two bundles when Felix starts up.
Now let's start up the server-side greeter bundles. Like with the DOSGi bundle itself, I'm installing these straight from the Maven release repository.
Code Block |
---|
-> start https://repository.apache.org/content/groups/snapshots/org/apache/cxf/dosgi/samples/cxf-dosgi-ri-samples-greeter-interface/1.1-SNAPSHOT/cxf-dosgi-ri-samples-greeter-interface-1.1-SNAPSHOT.jar -> start https://repository.apache.org/content/groups/snapshots/org/apache/cxf/dosgi/samples/cxf-dosgi-ri-samples-greeter-impl/1.1-SNAPSHOT/cxf-dosgi-ri-samples-greeter-impl-1.1-SNAPSHOT.jar -> ps START LEVEL 1 ID State Level Name [ 0] [Active ] [ 0] System Bundle (1.8.0) [ 1] [Active ] [ 1] Apache Felix Shell Service (1.2.0) [ 2] [Active ] [ 1] Apache Felix Shell TUI (1.2.0) [ 3] [Active ] [ 1] Apache Felix Bundle Repository (1.4.0) [ 4] [Active ] [ 1] OSGi R4 Compendium Bundle (4.1.0) [ 5] [Active ] [ 1] Distributed OSGi Distribution Software Single-Bundle Distribution [ 86] [Active ] [ 1] CXF Distributed OSGi Greeter Demo Interface Bundle [ 97] [Active ] [ 1] CXF Distributed OSGi Greeter Demo Service Implementation Bundle |
...