There has been some confusion before Java EE 7 about which annotations are correct to declare the managed beans. The issues are that the JavaServer Faces specification predates the later standard from the CDI and the fact that the scoping overlaps. The history of scopes comes from the original design and definition of the servlet container and providing convenience to the application developer. A scope is simply a map collection of name/value pairs. It helps to think of them as java.util.Map
type hash map collections. The scopes differ in their life span.
For CDI, the package name is javax.enterprise.context
, and for JSF managed beans, the package is javax.faces.bean
.