I\'ve just started reading through Core JavaServer Faces, 3rd Ed. and they say this (emphasis mine):
It is a historical accident that there are two se
With Java EE 6 and CDI you have different option for Managed Beans
@javax.faces.bean.ManagedBean
is refer to JSR 314 and was introduced with JSF 2.0. The main goal was to avoid the configuration in the faces-config.xml file to use the bean inside an JSF Page. @javax.annotation.ManagedBean(“myBean”)
is defined by JSR 316. It generalizes the JSF managed beans for use elsewhere in Java EE@javax.inject.Named(“myBean”)
are almost the same, as that one above, except you need a beans.xml file in the web/WEB-INF Folder to activate CDI.