It can be some thing like this. you can remove the mpb from the session, bean name will be the one you specify in your faces-config.xml.
Class.setVariableValue("#{" + beanName + "}", null);
public static void setVariableValue(
String facesVarName, Object newValue) {
FacesContext ctx = getFacesContext();
ValueBinding bind = ctx.getApplication().createValueBinding(facesVarName);
Class bindClass = bind.getType(ctx);
if(!bindClass.isPrimitive())
{
if(newValue == null || bindClass.isInstance(newValue))
bind.setValue(ctx, newValue);
}
else
bind.setValue(ctx, newValue);
}