Shared-Data Overlay Network (SON)

Run your components

In this tutorial we present how to run two components.

Here we create the Observer design pattern in components.

Create two components with the wizard

Create two components names

  • "mycompany.mymodule.observable"
  • "".

Edit the CDML

As the CDML are edited, you can build the components by deleting, running the buildST.xml scripts for each project, and finally refresh the two projects.

Edit the facades (

Observer's Facade

Observable's Facade

Change the MANIFEST of Observable

Add a Bundle dependency to inria.smarttools.componentsmanager and a Package dependency to "javax.swing".

Activate SON

We define one component (Observable) as the PON activator.

Please create and edit a World file into the "mycompany.mymodule.observable" package.

The edit the Activator of Observable.

Configure a Run profile for a new Equinox Runtime

Go to the "Run..." window, click on Equinox Framework and create a new Runtime.

Set a name

Unset all bundles from Eclipse, and set these bundles : inria.smarttools.componentsmanager, inria.smarttools.ds.local, inria.smarttools.core, inria.smarttools.dynamic and inria.smarttools.lib only.

Click on add required bundles.

Set a level 1 or 2 to Observable, and true to Auto-start.

Set componentsmanager's Auto-start to false.

Mac OS X specific setting

Remove argument except "-clean" and "-console", but add "-d64" in the VM arguments.

d64 arg for macosx


Apply the settings and run.

The SON platform will start and connect two components.

The observable-1 component instance display a Swing view. Put something, and fire a notification.

The observer-1 component instance should receive the notification, and display a message in the console. Results

You learn how to set up an PON runtime with Equinox, and how to configure the componentsManager with a World file.

Note that you can start the ComponentsManager with a personnalized World with a System Property called "smarttools.worldfile". So you can leave the Observable Activator without loading a World and starting the CM. You will have to start the CM and not the Observable anymore.

INRIA main page