Le blog de Fabien DUMINY

Un blog utilisant WordPress

Skip to: Content | Sidebar | Footer

Paris JUG – OSGI conference

21 October, 2008 (21:48) | Event, Java, Paris JUG | By: fabien

Paris JUG A couple of weeks ago, I discovered Paris JUG, a java user group based on Paris area. As they were giving a free OSGI conference, subject which interest me, I went there last tuesday.
Here are various notes I have taken there :

    Incoming events in the group :

  • February 2009 : It’s the first birthday of the group. On this occasion, there will have quickies (15 minutes presentations)
  • Call for blogger (I have asked to add my blog and I am waiting the answer)
  • 4 November : conference on GWT (I intent to come)
  • 12 November : Open source exchange
Without OSGI

  • It’s possible to avoid collisions between different versions of the same library by repackaging them (changing package names) : It’s was has been done with tomcat which includes its own version of commons-dbcp (see reference)

Comparison of OSGI and JCP:

  • To become a member :
  • TCK (conformity tests) :
    • JCP : accessible especially to the open source community
    • OSGI : less easily accessible

OSGI and the JSR :

  • JSR 291 : created by the OSGI community to integrate in JAVA SE a dynamic component model based on OSGI
  • JSR 277 : has for goal to integrate the notion of modules in JAVA. This might not succeed and be merged with JSR 291
  • Spring DM (Dynamic Modules)
    • will probably become the next OSGI standard because it seems to be welcomed by the JAVA community
    • is normalizing its main ideas with the RFC 124. It seems to threaten the notion of «declarative service » (OSGI v4), which is a layer on top of OSGI targeting the declaration of imported and exported services by the bundle.

OSGI and the java applications :

  • Apache geronimo : the jars are OSGIfied but are not inside an OSGI container
  • Apache felix
    • implementation of an OSGI container by the apache community
    • allows to generate OSGI manifests with Maven
  • eclipse : based on OSGI since version 3.0
    • equinoxe : implementation of an OSGI container for eclipse
    • eclipse RAP (Rich Ajax Platform) : equinoxe in a web application
    • eclipse BIRT : example of a web application with its own OSGI container
  • Websphere 6.1 : full OSGI. It doesn’t expose OSGI APIs to web applications.
  • Service Mix, an ESB (Enterprise Service Bus) : manages (among others) the autorefresh of added/removed OSGI services.
  • PAX : open source project wrapping third party libraries with OSGI format. It’s compound of (among others) :
  • JUnit : it’s mono ClassLoader and that’s a problem with OSGI
  • Spring DM : probably the future OSGI standard

Remarks on OSGI :

  • One ClassLoader per bundle
  • Class.forName : to avoid with OSGI as much as possible. See the discussion on that subject.
  • The OSGI ServiceTracker can see many service (JAVA interface) implementations
  • Problem : How to add a dynamic dependency ? Solution: attach a « bundle fragment » by adding « Bundle-Host: bundle_name» in the manifest

Various notes :

  • The manifest file is limited to 76 columns (strange limit …)
  • Eclipse feature : it’s a set of plugins, for example a functional domain in an enterprise application

To learn more :

Be Sociable, Share!
Share and Enjoy

Write a comment

If your website is claim enabled, it will be notified that you have posted here.

MySQL query error