The way I was thinking to fix this was to continue to look for @Config (or
whatever name it should have) but add an annotation to it dynamically on
the injection point.  Then change the producer method to look for that
annotation to decouple the two.

The reason I bring this up, when looking at OSGi support, it came up that
CDI was a required asset.  I was able to work around it for now, but
realistically to run the non-CDI based components I shouldn't need to list
CDI as a dependency.

John

On Sun, May 1, 2016 at 11:29 AM Werner Keil <[email protected]> wrote:

> Not sure, what happened to those annotations, especially JavaDoc looks
> quite inconsistent or outdated
>
> {@code
> // * pubic class ConfiguredItem{
> // *
> // * @ConfiguredProperty
> // * private String aValue;
> // * }
>
> There is no @ConfiguredProperty, maybe @Config was supposed to take its
> place.
>
> In an internal heavily CDI-based framework a recent client had developed,
> they did also apply something like @Configured or @Configurable, so which
> ever way the annotation is called or improved, it should be there, at least
> as an optional module or in the core API.
>
> Regards,
> Werner
>
>
>
> On Sun, May 1, 2016 at 5:16 PM, John D. Ament <[email protected]>
> wrote:
>
> > Hey guys
> >
> > I was wondering, why is the annotation Config a qualifier?
> >
> >
> https://github.com/apache/incubator-tamaya/blob/master/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java
> >
> > It seems out of place.  Injection as I understand it is a way to provide
> a
> > typesafe impl of a configuration object at runtime.  There are separate
> > modules for CDI that handle injection into CDI beans, and the provider of
> > this annotation is in CDI so I'm not sure why its an injection
> > requirement.  If the intention was to have a single annotation represent
> > both the typesafe objects and CDI beans that makes sense, but then it
> > probably shouldn't be a qualifier.  We can update the CDI extension to
> look
> > for fields with @Config and add a qualifier to them that can be processed
> > at runtime.
> >
> > John
> >
>

Reply via email to