Bioclipse2 and Spring

Yesterday wasn't a great day for me. I was trying something called Spring-osgi and nothing worked. But I should take it from the beginning or at least a bit earlier.

Spring is a java framework that delivers great features (like Aspect oriented programming) for building java applications. The problem is that Eclipse's plugin structure makes things a little bit more complicated. This is where the Spring-OSGI project enters the scene. The OSGi framework specification forms the basis of the Eclipse Runtime and Spring-osgi is a project for using Spring in an osgi framework. So far so good (in theory). Spring-osgi seems to be a relatively new project and I am not sure that it is mature enough to be a part of Bioclipse 2.

What I tried to get working yesterday was a little mini example Spring service supplied by the Spring osgi project. I failed horribly when it came to running the osgi integration tests.

It would be great to have this in Bioclipse 2 but as things are right now I am not sure it is worth it. We will see what will happend.


  1. So, why does Bioclipse need aspect oriented programming? And what causes Spring to have trouble with OSGi?

  2. As for the question "why does Bioclipse need aspect oriented programming?"

    I can see many situations in which it would be great(Exception handling, logging of exception, just generally in the scripting module and I also think it would be great to already have Spring the day when we start interacting with databases through ORM's (for example in the structuredb plugin) but I am currently pondering whether it's worth it.

    As for the second question, what causes Spring to have trouble with OSGI I am not sure I am capable of answering it. The spring-osgi project is still fairly young and I haven't yet been able to figure out wether it works and how it's working exactly.

  3. Hi Jonalv,

    I'm sorry the sample did not work for you - IIRC you posted on our mailing list and you got a reply - did that help?

    I strongly recommend you look at the newly released RC1 which features a lot of new documentation including a full chapter on testing.

    As for AOP usage on OSGi, note that this is not an easy nut to crack.
    One can use DynamicImports* to get around the class loading problems but this goes against the OSGi nature.
    A proper solution requires support from the OSGi platform - this is going to be addressed to some degree in the upcoming OSGi r5 release. Equinox platform also provides some help with AOP through one of its incubation projects:
    In both cases, the AOP support is based on the OSGi platform internals rather then OSGI public API.

    Back to Spring-DM, we do use AOP but only internally since it is heavily customized to our particular use cases. We don't currently provide a solution for generic AOP on OSGi for the reasons aforementioned.
    In fact, the reference documentation describes what Spring-DM supports and how its features work.

    Note that in the upcoming 1.1 branch we will be address ORM/JDBC problems as well as web applications.

    If you have any questions, then please use the mailing list.

    Costin Leau
    Spring-DM Lead