The fact that you can have multiple AnnotatedTypes per Java type is
clarified in CDI-58.
On 10/14/2011 12:52 PM, Mark Struberg wrote:
Hi!
Currently tracking down why seam-config sometimes does not work work OWB.
Seems that the issue is that OWB and Weld does tread AnnotatedTypes registered with
BeforeBeanDiscovery in a different way.
Assume we have the following class in a BDA:
@RequestScoped
public class Doodings {
...
}
and you have a seam-beans.xml config for it too
Then seam-xml will add an AnnotatedType for it in @Observes BeforeBeanDiscovery. So far
so good.
Later in the class scanning, when scanning Coodings.class, we (Apache OpenWebBeans)
recognizes that the class already has a prepared AnnotatedType and use that for the system
event. Apparently Weld does things different and creates a fresh AnnotatedType purely
based on the native class!
That's the reason why seam-config in weld has to veto the freshly scanned type to
prevent double existence of Bean<Doodings>, and in OWB this hack causes a
problem...
I think there is room for improvement in the specification of AnnotatedTypes in the CDI
spec ...
The behaviour must get clarified imo, wdyt?
LieGrue,
strub
_______________________________________________
cdi-dev mailing list
cdi-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev