How to check if a session is invalid or not? There is no method in the API.
Is it the same as isNew()? And what is the difference if not?
isNew()
For all intents and purposes, yes. However, it will throw an IllegalStateException if called on a session invalidated in the same request-response cycle.