Versions Compared

Key

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

...

To set up Felix you can follow these steps:
Verified with: Felix 1.8.0

Code Block
../felix-1.8.0>java0> java -jar bin/felix.jar

Welcome to Felix.
=================

-> start http://archive.apache.org/dist/felix/org.osgi.compendium-1.2.0.jar
-> start http://www.apache.org/dist/cxf/dosgi/1.0/cxf-dosgi-ri-singlebundle-distribution-1.0.jar
... some log messages may appear...
-> 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 (1.0)

However, you can also change the conf/config.iniproperties file to automatically load these bundles. This approach is described in the Multi Bundle Setup page.

...

The compendium interfaces are part of the Equinox/Eclipse distribution and can be found in a file called plugins/org.eclipse.osgi.services_3.2.0.v20090306v20090520-19001800.jar (the timestamp could vary).

To set up Equinox you can follow these steps:
Verified with: Eclipse 3.5 RC 3

Code Block

The Samples

The samples directory contains the these sample projects:

.../eclipse>java -jar plugins/org.eclipse.osgi_3.5.0.v20090520.jar -console
osgi> install file:plugins/org.eclipse.osgi.services_3.2.0.v20090520-1800.jar
Bundle id is 1

osgi> install http://www.apache.org/dist/cxf/dosgi/1.0/cxf-dosgi-ri-singlebundle-distribution-1.0.jar
Bundle id is 2

osgi> start 2
... some log messages may appear...
osgi> ss

Framework is launched.

id      State       Bundle
0       ACTIVE      org.eclipse.osgi_3.5.0.v20090520
1       RESOLVED    org.eclipse.osgi.services_3.2.0.v20090520-1800
2       ACTIVE      cxf-dosgi-ri-singlebundle-distribution_1.0.0

However, you can also create a config.ini file to automatically load these bundles. This approach is described in the Multi Bundle Setup page.

The Samples

The samples directory contains the these sample projects:

Sample

Description

Doc Page

greeter

a very simple demo of a Greeter OSGi Service exposed remotely and a Consumer invoking on it.

Walkthrough of

Sample

Description

Doc Page

greeter

a very simple demo of a Greeter OSGi Service exposed remotely and a Consumer invoking on it.

Walkthrough of the Greeter Demo

spring_dm

a demo created using Spring-DM. Rather than invoking on the OSGi API's directly, the Spring-DM demo shows how you can use Spring to configure your beans as OSGi Services and similarly how to use Spring-DM to invoke a (remote) OSGi Service.

DOSGi Spring-DM Demo page

ds

this demo shows how Distributed OSGi can be used with OSGi Declarative Services (DS).

DOSGi DS Demo page

...

To get all the source of the samples:

  1. simply check out the DOSGi trunk from SVN (http://svn.apache.org/repos/asf/cxf/dosgi/trunk

...

  1. Image Modified)

...

  1. go into the samples directory
  2. and build them using mvn install

...

Using it in your OSGi container

...