I'm not too sure whether this is the right place/thread to discuss about DS vs Blueprint, but IMHO DS offers less possibilities than Blueprint.
Anyway, as far as I know you can't. But you may deal with the ConfigurationAdmin, BundleContext and ManagedService. I've wrapped all this to make it easy (and to rely as less as possible on OSGi specific API) with a couple of beans and a whiteboard interface to deal with config updates. Now it's handy in Blueprint and it deals with config updates without restarting anything :) I guess you have to do the same. Good luck, JP De : David Jencks [mailto:[email protected]] Envoyé : mercredi 2 mars 2016 18:20 À : [email protected] Objet : Re: Dynamic Config Loading in Camel Application Bundle in Karaf 3.0.5 It would be a big change, but you might consider switching your application to use declarative services rather than blueprint. IMO blueprint is sort of spring shoehorned to sort of vaguely work a little bit in OSGI whereas DS is actually designed from the start to take full advantage of osgi. david jencks On Mar 2, 2016, at 3:50 AM, Debraj Manna <[email protected]<mailto:[email protected]>> wrote: I have a simple Camel Application bundle which is to be deployed in Karaf 3.0.5 under Apache Service Mix 6.1. The configuration file is placed in etc/ directory (let's say it is named as wf.cfg). I want to have the dynamic config change functionality in my application bundle. So that whenever something is changed in wf.cfg it is immediately available to bundle. For this I have added the following in my blueprint.xml <cm:property-placeholder persistent-id="wf" update-strategy="reload"> <cm:default-properties> <cm:property name="env" value="local" /> </cm:default-properties> </cm:property-placeholder> <!-- a bean that uses a blueprint property placeholder --> <bean id="configBean" class="com.jabong.orchestratorservice.basecomponent.config.ConfigBean"> <property name="env" value="${env}" /> </bean> The problem I am facing now is if the update-strategy is set to reload. Then it seems to be reloading the entire bean. Can someone let me know is there a way I can reload only the configBean not the entire bundle? If I can achieve this then may be I can have some static reference to the config variables inside the configBean which my application bundle can then make use of? The full blueprint.xml is placed here<https://gist.github.com/anonymous/b7482ab89766a57b162d>.
