I have a report that depending on the filter applied may take a long time to finish. On some occasions the user gives up waiting and closing the browser, it happens that the query is still running on tomcat. Is there a way to invalidate the session when the user closes the browser? I'm working with JSF 2.2 and ViewScoped on this screen.