Hi Guillaume,

spring-dm has some problems with classloading especially when used with namespaces. So when you use spring-dm you typically have to tune the Import-Package statements of the maven bundle plugin.

For blueprint this works much better. Blueprint namespace handlers use the correct classloader of the bundle that implements the namespace and the maven bundle plugin reads the blueprint context and add all that is there. So if you follow the conventions of the bundle plugin you can leave the Import-Package alone in most cases.

Blueprint also works better with camel and the property placeholders.

The only big disadvantage of blueprint is that it does not work outside OSGi. So you can not test your context in a simple integration test like for spring. You can use pax-exam though
to start an OSGi container for the test.

Btw. If you search for some real life blueprint examples then the Apache Karaf sources are a very good lecture. The modules use blueprint almost everywhere and show many of the features.

So overall I recommend to use blueprint for OSGi deployments.

Btw. I have a tutorial for camel with blueprint: http://www.liquid-reality.de/display/liquid/2012/01/03/Karaf+Tutorial+Part+5+-+Running+Apache+Camel+integrations+in+OSGi

Christian

Am 15.03.2012 17:22, schrieb PAC Kieffer Guillaume:
Hi,

I would like to have your opinion on what could be the best container to choose 
for OSGi bundles deployed on Servicemix 4 ?
Starting from scratch - Shall we start with Spring DM or blueprint ?

It seems they are both pretty the same, but nearly all readings I get, 
describes Camel Spring projects...
It seems that Spring DM is more prowerful in terms of bean management, 
autowiring capabilities.. transaction management, and comes out with a 
tremendous number of extensions..
I do not find any clear info (beside the spec) on blueprint but it appears to 
be the standard in the OSGi world and may be wider used and adopted within the 
new versions..

Thanks for the clarification,

Guillaume.



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply via email to