MyFaces CODI
  1. MyFaces CODI
  2. EXTCDI-184

mojarra causes a ContextNotActiveException

    Details

      Description

      ContextNotActiveException is caused by an access of a context and #isActive returns false.

      the implementation of #isActive for codi scopes is:
      return FacesContext.getCurrentInstance().getExternalContext().getSession(false) != null;

      that means a session is required and you just have to ensure that your application doesn't close it and tries to access a codi scope afterwards.

        Activity

        Hide
        Gerhard Petracek added a comment -

        workaround for mojarra: if it is a request, we have to force the creation of a new session.
        it's possible to deactivate this behaviour via: org.apache.myfaces.extensions.cdi.FORCE_SESSION_CREATION

        Show
        Gerhard Petracek added a comment - workaround for mojarra: if it is a request, we have to force the creation of a new session. it's possible to deactivate this behaviour via: org.apache.myfaces.extensions.cdi.FORCE_SESSION_CREATION

          People

          • Assignee:
            Gerhard Petracek
            Reporter:
            Gerhard Petracek
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development