I'm using Java EE 6 on JBoss EAP 6, and my JSF beans are annotated like this:
@ManagedBean @ViewScoped
(both from javax.faces.bean
package)
However, they are also CDI beans (default constructor, use of @Inject
, @PreDestroy
etc). I'm reading all the time that you can't mix these annotations (JSF and CDI), but it's apparently working fine: Injections are working, preDestroy is called on view change etc).
Am I missing something? What is the problem? Why not use?