Page tree

Versions Compared

Key

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

...

  • The java standard for Plugins is OSGi (http://www.osgi.org), this is what IGB (written in java) uses.
  • the OSGi term for a Plugin is Bundle, they mean the same thing.
  • an OSGi bundle is a jar file. It must have a MANIFEST.MF file with the OSGi headers (see below).
  • an OSGi bundle can (usually will) have a special java class called an Activator. This class must extend org.osgi.framework.BundleActivator, and implement the start() and stop() methods. The activator class is specified in the Bundle-Activator MANIFEST.MF header (see below). These methods are called when the bundle is started and stopped.
  • when a program is running with OSGi, the OSGi framework dynamically handles installing / uninstalling,
    activating (starting), deactivating (stopping), and upgrading bundles.
  • There are several implementations of OSGi, including:
    1. Apache Felix (http://felix.apache.org/)
    2. Eclipse Equinox (http://www.eclipse.org/equinox/)
    3. Knoplerfish (http://www.knopflerfish.org/)
  • the implementations are (for the most part) interchangeable and are free
  • the implementations allow the user to run OSGi from a command line tool or to start it within a program
  • IGB starts the felix implementation from within the com.affymetrix.igb.main.OSGiHandler class, but IGB can
    be run using the Felix command line tool by running ant gogo
  • there are several tutorials for OSGi, including:
    1. How to get Started with OSGi (http://www.osgi.org/About/HowOSGi)
    2. Apache Felix OSGi Tutorial (http://felix.apache.org/site/apache-felix-osgi-tutorial.html)
    3. OSGi for Beginners (http://www.theserverside.com/news/1363825/OSGi-for-Beginners)
    4. OSGi with Eclipse Equinox - Tutorial (http://www.vogella.de/articles/OSGi/article.html)
  • IGB uses OBR (http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html) to find and load bundles from web servers (repositories). The web servers need to use OBR to create the repository.xml file
    listing all the available bundles.
  • Users can add / remove bundle repositories on the Preferences page.
  • IGB uses OSGi Services to allow bundles to add new implementations of existing IGB elements. The new implementations will show up as soon as the bundle is started. Examples are the IGB tabs and the graph functions.

Explain:

  • What is a bundle? Give an example.
  • What is OSGi and how does it work?
    • Explain what an Activator is.
  • Provide references to tutorials developers new to the concept of bundles can read to get familiar with the topic.
  • Explain the concept of extension point.
  • Explain the advantages of bundles, plug-ins. (Ann can write this part after talking more with Michael and Lance.)

Developing IGB bundles

IGB bundles are OSGi compatible, so they should have an Activator and they must have a MANIFEST.MF file that is found in the META-INF directory. These are compiled and jarred with all required classes, jars, and resources. The resulting jar is the bundle. This can then be uploaded to the bundle repository. At that point, any one can use the bundle with IGB. IGB uses the Apache Felix OSGi implementation, but this could change, so no Felix specific code should be used. In the Activator class, there is a start() and stop() method. This is where you want to put all the code to start and stop the bundle.

...