!!! OSGi

__Open Services Gateway Initiative__

!! Resources

* [OSGi Alliance Home|http://www.osgi.org]
* [OSGi Core Release 5 Specification|osgi.core-5.0.0.pdf]
* [OSGi In Practice (Draft)|http://njbartlett.name/files/osgibook_preview_20091217.pdf]
* [Developing enterprise OSGi applications for WebSphere Application Server|http://www.ibm.com/developerworks/websphere/techjournal/1007_robinson/1007_robinson.html]
* [Manifest Headers|http://wiki.osgi.org/wiki/Category:Manifest_Header]
* [Tooling|http://wiki.osgi.org/wiki/Category:Tooling]
* [Building Modular Cloud Apps with OSGi|http://shop.oreilly.com/product/0636920028086.do]

* [Apache Felix, an implementation of the OSGi R4 Service Platform and other interesting OSGi-related technologies|http://felix.apache.org]
* [Apache Karaf, a small OSGi based runtime|http://karaf.apache.org]
* [Apache Aries, a set of pluggable Java components enabling an enterprise OSGi application programming model|http://aries.apache.org]
* [Pax Runner, a tool to provision OSGi bundles in all major open source OSGi framework implementations (Felix, Equinox, Knopflerfish, Concierge)|https://ops4j1.jira.com/wiki/display/paxrunner/Pax+Runner]
* [Equinox, a set of bundles that implement various optional OSGi services and other infrastructure for running OSGi-based systems. |http://www.eclipse.org/equinox/]
* [Apache ACE, an (OSGi based) software distribution framework to centrally manage and distribute software components|http://ace.apache.org/]


!! OSGi Tutorial

I started a simple exercise (see ''OSGi In Practice'' above).

Starting with Eclipse Kepler, downloaded the Equinox runtime first from [http://download.eclipse.org/equinox/]. 
Unzip it to {{/usr/local/equinox-sdk-keplersr1}}.

Then add the {{Equinox}} named User Library to Eclipse, pointing to {{/usr/local/equinox-sdk-keplersr1/plugins/org.eclipse.osgi_3.9.1.v20130814-1242.jar}} .

Create a new Java project named "OSGi Tutorial", and make sure you use the above User Library.

Create a new runtime configuration, new Java Application, enter search this should find {{org.eclipse.core.runtime.adaptor.EclipseStarter}} and program arguments ''-console -configuration runtime''. However, this does not work, you have to add the ''-consoleLog'', or the (error) logging will go to a file by default.

You also need a {{configuration/config.ini}} file with (example) the following contents to be able to run a basic OSGi runtime:
{{{
# contents of config.ini
osgi.bundles=\
/usr/local/equinox-sdk-keplersr1/plugins/org.apache.felix.gogo.command_0.10.0.v201209301215.jar,\
/usr/local/equinox-sdk-keplersr1/plugins/org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar,\
/usr/local/equinox-sdk-keplersr1/plugins/org.apache.felix.gogo.shell_0.10.0.v201212101605.jar,\
/usr/local/equinox-sdk-keplersr1/plugins/org.eclipse.equinox.console_1.0.100.v20130429-0953.jar,\
/usr/local/equinox-sdk-keplersr1/plugins/org.eclipse.osgi_3.9.1.v20130814-1242.jar@-1:start
}}}

All parameters for the config.ini are documented on the [Eclipse Help platform|http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html]