public static final RcfacesContext getInstance( ExternalContext externalContext) { if (externalContext == null) { externalContext = FacesContext.getCurrentInstance() .getExternalContext(); }  Map applicationMap = externalContext.getApplicationMap();  RcfacesContext cameliaContext; synchronized (CAMELIA_CONTEXT_PROPERTY) { cameliaContext = (RcfacesContext) applicationMap .get(CAMELIA_CONTEXT_PROPERTY);  if (cameliaContext == null) { applicationMap.put(CAMELIA_CONTEXT_PROPERTY, Boolean.FALSE);  cameliaContext = createCameliaContext(externalContext);  applicationMap.put(CAMELIA_CONTEXT_PROPERTY, cameliaContext); } }  return cameliaContext;
public static final RcfacesContext getInstance(FacesContext facesContext) { return getInstance(facesContext.getExternalContext());
    public static final RcfacesContext getInstance(            ExternalContext externalContext) {        if (externalContext == null) {            externalContext = FacesContext.getCurrentInstance()                    .getExternalContext();        }        Map applicationMap = externalContext.getApplicationMap();        RcfacesContext cameliaContext;        synchronized (CAMELIA_CONTEXT_PROPERTY) {            cameliaContext = (RcfacesContext) applicationMap                    .get(CAMELIA_CONTEXT_PROPERTY);            if (cameliaContext == null) {                applicationMap.put(CAMELIA_CONTEXT_PROPERTY, Boolean.FALSE);                cameliaContext = createCameliaContext(externalContext);                applicationMap.put(CAMELIA_CONTEXT_PROPERTY, cameliaContext);            }        }        return cameliaContext;    }