I have an entity:-
@Entity
@Table
public class Application{
@Inject
@QualifierName
private Event<Application> applicationXXX;
public void someMethod(){
applicationXXX.fire(someObject);
}
//BODY
}
In MyEventhandler Class , I'm using :
public void onXXX(@Observes @QualifierName Object someObject){
}
the injection in Application class for Event --- applicationXXX is null.
however the same injection if i do in some other class then it's not null and working.
can any one help me and point out what I'm missing here ???
can't i inject CDI events in Entity ??? or is there any other method ???
Thanks