I just started implementing a ServletContextListener that will call the appropriate transition for sessions that are destroyed normally (timeout or user logout) and a Quartz job that will handle sessions that have been closed by unexpected crash of the appServer (hopefully, it'll never have to do anything).
Stop me please if there is a smarter way to do this.
Thanks