Contribution OSGi


This sample packages the calculator sample as an OSGi bundle. The main differences over and above the basic calculator sample is that the bundle has a bundle activator. When the bundle is installed and started in OSGi the bundle activator starts the Tuscany runtime and runs the sample. 

See samples/running_tuscany/osgi for instructions for installing the Tuscany runtime in OSGi. Once the runtime is installed this contribution can be installed from the OSGi command line using the following command. 

osgi> install file:///c:\path\to\Tuscany\installation\samples\learning-more\contribution-osgi\target\sample-contribution-osgi.jar

This should give rise to a message indicating the bundle ID as follows:

Bundle id is 264

The bundle can then be started using:

osgi> start 264