Support producers and observers on default beans
------------------------------------------------
Key: WELDX-135
URL: https://jira.jboss.org/browse/WELDX-135
Project: Weld Extensions
Issue Type: Feature Request
Affects Versions: 1.0.0.Alpha2
Reporter: Pete Muir
Fix For: 1.0.0.Beta1
Changing the current implementation so it looks like:
1) Observe ProcessAnnotatedType and if the bean class is annotated
@DefaultBean, replace qualifiers for the class, producers and observers with a
synthetic qualifier and record that synthetic qualifier (e.g. Map<Class<?>,
Annotation>) - we need to do this for the bean class, and for the type of each
producer
2) Observe ProcessBean, and if we get a bean with the synthetic qualifier,
record it as belonging to the qualifier (e.g. Multimap<Annotation, Bean<?>>)
3) In AfterBeanDiscovery, for those default beans that are left, reset their
qualifiers (wrap them as forwarding beans) and add them back in. The default
bean type will become defaulted to the declared return type or the managed
bean's declared type.
This should lift all the limitations on default beans (e.g. no producers, no
interceptors).
Each producer will be totally independent of the declaring bean. So you could
override the declaring bean, and not the producers, and still get the producers
from the default bean (though this would be an unusual use case). The more
common use case is that you wouldn't override the main bean, but would override
the producer methods on it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues