I'm trying to make such a stereotype:
@Stateless
@LocalBean
@Documented
@Stereotype
@Target({ TYPE })
@Retention(RUNTIME)
public @interface DAO {
}
After deploy on JBoss AS6 I'm getting an error:
.weld.exceptions.DefinitionException: WELD-000816 Cannot determine constructor to use for public abstract interface@Retention @LocalBean @Documented @Target @Stereotype @Stateless class xxx.DAO
It seems that Weld try to instantiate my annotation as a bean. Is it ok?
You should not place @LocalBean on a stereotype.