@Override
    public ExternalContext getExternalContext() {
        if (externalContext == null) {
            externalContext = new PrimeExternalContext(getWrapped().getExternalContext());
        }
        return externalContext;
    }
Custom {@link FacesContextWrapper} to init and release our {@link PrimeRequestContext}.
primefaces/src/main/java/org/primefaces/context/PrimeFacesContext.java