2 Replies Latest reply on Jul 28, 2011 9:53 PM by Emmanuel Rousselle

    Seam Faces & @ManagedBean

    Emmanuel Rousselle Newbie

      Hello,


      I have a class annotated with:


      @ManagedBean(eager = true, name = "connectionManager")
      @ApplicationScoped



      The purpose of this class is to provide an injectable resource that should not bean instantiated more than once.


      I also have a bean that's injecting the resource with the following annotation:


      @ManagedProperty(value="#{connectionManager}")



      When the application is deployed, the deployment fails with the following error:


      java.lang.RuntimeException: Use of @javax.faces.bean.ManagedBean is forbidden. Please use @javax.inject.Named instead.
              at org.jboss.seam.faces.context.FacesAnnotationsAdapterExtension.failIfJsfManagedBeanAnnotationPresent(FacesAnnotationsAdapterExtension.java:57)





      Why is @javax.faces.bean.ManagedBean use forbidden when using Seam Faces? What are my alternatives here?


      Thanks!