Re: [blueprint-maven-plugin] Ideas for config handling

2016-10-18 Thread Dominik Przybysz
I also suggest changing of package to org.apache.aries.blueprint. *annotation*.config 2016-10-18 13:46 GMT+02:00 Dominik Przybysz : > Hi, > produces property-placeholder looks of course like this: > > http://aries.apache.org > /blueprint/xmlns/blueprint-cm/v1.1.0" persistent-id="org.apache.aries.

Re: [blueprint-maven-plugin] Ideas for config handling

2016-10-18 Thread Dominik Przybysz
Hi, produces property-placeholder looks of course like this: http://aries.apache.org /blueprint/xmlns/blueprint-cm/v1.1.0" persistent-id="org.apache.aries.my" placeholder-prefix="$[" placeholder-suffix="]" update-strategy="reload"> I also suggest changing org.apache.aries.blueprint.api.config

Re: [blueprint-maven-plugin] Ideas for config handling

2016-10-18 Thread Christian Schneider
After discussing some more with Dominik I came up with this design: https://github.com/apache/aries/blob/trunk/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/BeanWithConfig.java The main annotations are @Config to configure the property-placeholder Element

Re: [blueprint-maven-plugin] Ideas for config handling

2016-10-12 Thread Christian Schneider
If you can share the config between components by using it in different places then it can indeed work in the same way with blueprint. I always though the idea in DS would be to only inject the config at one place. (Lots to learn still :-) Christian On 12.10.2016 09:29, David Jencks wrote: I’

Re: [blueprint-maven-plugin] Ideas for config handling

2016-10-12 Thread David Jencks
I’m afraid I don’t understand what the problems you see are, perhaps because I use blueprint so infrequently. Could you provide little code snippets to illustrate? Recall that in the DS approach many components in the same bundle can use the same pid, and that a config annotation used by a DS

Re: [blueprint-maven-plugin] Ideas for config handling

2016-10-11 Thread Christian Schneider
I like the approach in DS to supply the config in one event but I don´t think it matches how dependency injection in blueprint works. In blueprint that config is often applied in different beans. Each bean is injected with config and its dependencies. Only after this step the init-method is used a

Re: [blueprint-maven-plugin] Ideas for config handling

2016-10-11 Thread David Jencks
I don’t think i would consider ever recommending anyone use blueprint for anything, but if I were to design something like this I would take the opportunity to get one of the big advantages of DS also in blueprint, that all the configuration info is supplied in one event. So using your annotati

Re: [blueprint-maven-plugin] Ideas for config handling

2016-10-11 Thread Christian Schneider
By default @Named("key") is used to inject a certain bean when type information alone is not unique. In blueprint-maven-plugin we map it to a bean id. So simply using the key for configs might overlap too easy. So I am not sure which exact syntax we should use but the simple name is not enough.

Re: [blueprint-maven-plugin] Ideas for config handling

2016-10-11 Thread Guillaume Nodet
I like the use of annotations for config. I've implemented it for CDI and it's quite nice. I'm not sure that reusing @ObjectClassDefinition is a good idea, afaik SCR does not use it either. I'd rather create a new blueprint annotation for such support. Also, I'm a bit skeptic about @Named("${key}"