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

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

    Craig Greenhalgh Newbie

      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?