It could not just simply remove the session attribute by using invocation removeAttribute.

You have to remove it by setting it to null.