I have a method to remove a session managed bean
public void invalidMyBean()
{
final Map<String, Object> sessionMap = FaceContext.getCurrentInstance().getExternalContext().getSessionMap();
sessionMap.remove("mySessionBean");
}
invalidMyBean() is also called from a Web Service. In this case FaceContext.getCurrentInstance() is null, and I can't remove my bean. I tried to store sessionMap as a field in my class, but removing from this object does'nt work. Is there a way to retrieve sessionMap outside from a faceContext ?
thx