Description:
|
Currently the (skipped) {{AccessibleAlternativesTest}} tests for something that is not guaranteed by the spec. It assumes that in the following layout (simplified, all files in appropriate folders):
{noformat} WAR AccessibleAlternativesTest.class AUser.class
JAR beans.xml (defines
B
BUser
as alternative) BUser.class (Alternative) IUser.class {noformat}
the {{BUser}} class will be injected into {{IUser}} injection point in {{AccessibleAlternativesTest}}. This, however, can't work because {{BUser}} is defined as an alternative only for the JAR bean archive and therefore is not found as an alternative in the WAR bean archive.
As per CDI 1.0, 5.1.1, bq. An alternative must be explicitly declared using the {{<alternatives>}} element of the {{beans.xml}} file *of the bean archive*.
|