Avoid using the deprecated annotations and interfaces in the javax.faces.bean package

This rule flags the use of deprecated interfaces and annotations in the javax.faces.bean package. The following interfaces and annotations were replaced with interfaces and annotations in different packages:

Deprecated Class

JavaEE8 Class

javax.faces.bean.ApplicationScoped

javax.enterprise.context.ApplicationScoped

javax.faces.bean.CustomScoped

javax.enterprise.context.spi.Context

javax.faces.bean.ManagedProperty

javax.faces.annotation.ManagedProperty

javax.faces.bean.NoneScoped

javax.enterprise.context.Dependent

javax.faces.bean.RequestScoped

javax.enterprise.context.RequestScoped

javax.faces.bean.SessionScoped

javax.enterprise.context.SessionScoped

javax.faces.bean.ViewScoped

javax.faces.view.ViewScoped

javax.faces.bean.ManagedBean has been replaced by the Managed Beans specification in general and specifically the dependency injection, scopes and naming from the CDI specification. Note that the eager attribute for application scoped beans is replaced specifically by observing the javax.enterprise.context.Initialized event for javax.enterprise.context.ApplicationScoped .

There is no direct replacement for javax.faces.bean.ReferencedBean other than using the XML variant in faces-config.xml