4 Replies Latest reply on Jul 6, 2011 3:43 AM by craiggreenhalgh

    Do CDI beans need to be @ApplicationScoped for errai to use?

    craiggreenhalgh

      I see all the examples use @ApplicationScoped beans.

       

      I would like to use requestScoped if at all possible?

       

      The problem I have with @ApplicationScoped is that I inject a @Stateless EJB which in turn fires an "Authenicated" event.  I have a @SessionScoped bean that observes this event.  When my Errai CDI bean is @ApplicationScoped i get the following error when the event is fired:

       

      Caused by: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped

       

      Any ideas?

       

      Thanks

       

      Craig