[cdi-dev] explicit bean archives discovery-mode 'annotated'

Jozef Hartinger jharting at redhat.com
Fri Mar 6 02:11:42 EST 2015


This interface/enum discovery use-case very often uses a marker 
annotation (e.g. @MessageBundle). Such extension can work around this 
limitation by making the marker annotation a @Stereotype. Can you see 
any other scenarios where implicit bean archives are a problem?

On 03/05/2015 09:28 AM, Mark Struberg wrote:
> Well, the terms ‚explicit‘ and ‚implicit‘ BDA are blurry as well. I_explicitly_  add a beans.xml with version=1.1 and bean-discovery-mode=„annotated“ and still it is an ‚implicit‘ BDA according to those definitions. Not very self-explaining but anyway. Has not much to do with the current topic as well, so not sure why you mentioned it?
>
> An example of usability would e.g. be the DeltaSpike @MessageBundle feature. Seam3 has had something similar afair.
> For those who don’t know it see [1]. You basically have an interface and DeltaSpike automatically picks those up and provides implementations for them which are registered as Beans.
>
> But in the ‚annotated‘ mode we wont get any PAT for those interfaces anymore. The same mechanism is used tor JPA archives, PropertyFileConfig, etc…
> Just grep DeltaSpike and check where PAT gets used. It’s all over the place…
>
> LieGrue,
> strub



More information about the cdi-dev mailing list