public class Mock extends Real {
}
------------------------------------------------------------------------------------------------------
If I register class Mock as an @Alternative in beans.xml, everything works fine.
<alternatives>
<class>at.w0mb.example.Mock</class>
</alternatives>
As soon as I try:
------------------------------------------------------------------------------------------------------
@Alternative
@Stereotype
@Retention(RUNTIME)
@Target(TYPE)
public @interface Mock {}
@Singleton
@ConcurrencyManagement(ConcurrencyManagementType.BEAN)
@Mock
//@Alternative
@Specializes
public class Mock extends Real {
}
------------------------------------------------------------------------------------------------------
If I now register the @Stereotype Mock as an @Alternative in beans.xml, the application won΄t deploy.
<alternatives>
<stereotype>at.w0mb.example.stereotype.Mock</stereotype>
</alternatives>
The thrown error message is:
WELD-001408 Unsatisfied dependencies for type [DemoInterface]
.
Do you guys think that this is normal? Is it a specification Issue? Or Weld?
Regards,
Daniel