[cdi-dev] [JBoss JIRA] (CDI-314) Clarify behaviour if both a stereotype and a bean class is used to select/deselect an alternative bean
Martin Kouba (JIRA)
jira-events at lists.jboss.org
Wed Dec 19 07:57:08 EST 2012
Martin Kouba created CDI-314:
--------------------------------
Summary: Clarify behaviour if both a stereotype and a bean class is used to select/deselect an alternative bean
Key: CDI-314
URL: https://issues.jboss.org/browse/CDI-314
Project: CDI Specification Issues
Issue Type: Clarification
Affects Versions: 1.1.PRD
Reporter: Martin Kouba
In CDI 1.1 a bean which has {{@Alternative}} stereotype applied may be selected using the bean class. If both a stereotype and a bean class is used to select/deselect an alternative bean, conflicts may occur (in the cotext of CDI-18). E.g.:
{code}
@Stereotype
@Alternative
@Target({ TYPE, METHOD, FIELD })
@Retention(RUNTIME)
public @interface Mock {
}
@Mock
class Foo {
}
<beans>
<alternatives>
<class priority="1000">org.mycompany.Foo</class>
<stereotype priority="100">org.mycompany.Mock</stereotype>
</alternatives>
</beans>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev
mailing list