Hi, @JP: The problem is not using 2 property placeholder, but sharing one property placeholder across multiple bundles. And in that case, it seems that we have to avoid it because it can cause trouble to the Config Admin due to concurrency issues (it's actually what I read, I didn't take a look to the code).
@Christian: Thanks for your answer. I actually had the same idea but I'm a guy who is looking for icing by using Config Admin with its dynamical behavior :-). But if there is no other solution, I'll go to that direction. On Fri, Sep 25, 2015 at 11:34 AM Christian Schneider < [email protected]> wrote: > You can use the <ext:property-placeholder placeholder-prefix="$[" > placeholder-suffix="]"/> > It allows access to the System.properties and use it for shared config. > See: > https://github.com/apache/karaf/blob/karaf-3.0.x/bundle/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml > > It can be used together with a cm:property-placeholder that contains > bundle specific config from config admin. > > One problem is that the System properties do not support updates in case > of changes. So you can only use it for relatively fixed configs. > > > Christian > > > Am 25.09.2015 um 10:04 schrieb Arnaud Deprez: > > Hi folks, > > I would like to have your opinion about my needs. > I've several bundles which all need their custom configuration (own PID) > but all of them depends on some common configuration depending on which > environment (ie: test, production) my karaf instance is running. > > I'm currently using apache blueprint. So I would like to do is for > example, if I use [[env.name]] it will retrieve the config value from > global configuration and if I use {{bundle.name}}. > > So my questions is : > Is there a way to use common/global configuration with my current bundle > configuration ? > If yes, is it possible with blueprint or do I have to change my tech stack > ? > What are best practices ? > And icing on the cake, do you have example ? > > Rgds, > > Arnaud > > >
