THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
The greeter demo can be found in the samples/greeter directory of the SVN code base and implements a simple OSGi Greeter Service and a consumer to that service with a trivial UI.
In this walkthrough all the required bundles are installed straight from the maven release repository, so no need to check out SVN and build anything to get started with the Greeter Demo.
NOTE: this demo requires CXF/DOSGi 1.1
The Greeter demo design
The demo is composed of 3 bundles:
...
Code Block |
---|
C:\felix-framework-3.0.1> Welcome to Apache Felix Gogo g! install http://repo1.maven.org/maven2/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar g! start http://www.apache.org/dist/cxf/dosgi/1.12/cxf-dosgi-ri-singlebundle-distribution-1.12.jar ... some log messages may appear... g! lb 0|Active | 0|org.apache.felix.framework (3.0.1) 1|Active | 1|org.apache.felix.bundlerepository (1.6.2) 2|Active | 1|org.apache.felix.gogo.command (0.6.0) 3|Active | 1|org.apache.felix.gogo.runtime (0.6.0) 4|Active | 1|org.apache.felix.gogo.shell (0.6.0) 5|Resolved | 1|osgi.cmpn (4.2.0.200908310645) 6|Active | 1|cxf-dosgi-ri-singlebundle-distribution (1.2.0) |
...
Code Block |
---|
g! start http://repo1.maven.org/maven2/org/apache/cxf/dosgi/samples/cxf-dosgi-ri-samples-greeter-interface/1.12/cxf-dosgi-ri-samples-greeter-interface-1.12.jar g! start http://repo1.maven.org/maven2/org/apache/cxf/dosgi/samples/cxf-dosgi-ri-samples-greeter-impl/1.12/cxf-dosgi-ri-samples-greeter-impl-1.12.jar ... some log messages will appear ... g! lb START LEVEL 1 ID|State |Level|Name 0|Active | 0|System Bundle (3.0.1) 1|Active | 1|Apache Felix Bundle Repository (1.6.2) 2|Active | 1|Apache Felix Gogo Command (0.6.0) 3|Active | 1|Apache Felix Gogo Runtime (0.6.0) 4|Active | 1|Apache Felix Gogo Shell (0.6.0) 5|Resolved | 1|osgi.cmpn (4.2.0.200908310645) 6|Active | 1|Distributed OSGi Distribution Software Single-Bundle Distribution 7|Active | 1|CXF Distributed OSGi Greeter Demo Interface Bundle 8|Active | 1|CXF Distributed OSGi Greeter Demo Service Implementation Bundle |
...
Code Block |
---|
/eclipse> java -jar plugins/org.eclipse.osgi_3.6.0.v20100517.jar -console osgi> install install file:plugins/org.eclipse.osgi.services_3.2.100.v20100503.jar Bundle id is 1 osgi> install http://www.apache.org/dist/cxf/dosgi/1.12/cxf-dosgi-ri-singlebundle-distribution-1.12.jar Bundle id is 2 osgi> start 2 ... some log messages may appear... |
...
Code Block |
---|
osgi> install http://repo1.maven.org/maven2/org/apache/cxf/dosgi/samples/cxf-dosgi-ri-samples-greeter-interface/1.12/cxf-dosgi-ri-samples-greeter-interface-1.12.jar Bundle id is 3 osgi> install http://repo1.maven.org/maven2/org/apache/cxf/dosgi/samples/cxf-dosgi-ri-samples-greeter-client/1.12/cxf-dosgi-ri-samples-greeter-client-1.12.jar Bundle id is 4 osgi> ss Framework is launched. id State Bundle 0 ACTIVE org.eclipse.osgi_3.6.0.v20100517 1 RESOLVED org.eclipse.osgi.services_3.2.100.v20100503 2 ACTIVE cxf-dosgi-ri-singlebundle-distribution 3 INSTALLED cxf-dosgi-ri-samples-greeter-interface 4 INSTALLED cxf-dosgi-ri-samples-greeter-client osgi> start 4 |
...