I'm developing an application in JSF and I came across the following methods and want to know the difference between them.
((HttpSession)FacesContext.getCurrentInstance()
.getExternalContext().getSession(false)).invalidate();
and
FacesContext.getCurrentInstance().getExternalContext().invalidateSession();