Alright I have an interesting problem,
I have an XML Request on a page that I’m building, on the server-side I would like to check and see if the Session gets invalidated to do some graceful browsing redirects since the application has the possiblity of multiple windows.
That isn’t hard at all, but what I’m curious about is if I can keep the request running (via sleep()) and keep checking to see if the Session gets invalidated so that I can do some things on the client side in case the user logs out.
When I was testing this out, I saw that even if I invalidated a Session in one thread, the others still held a copy of the Session before it was invalidated. So is there anyway I can request a copy of the main session object again since request.getSession() gives a copy of the session when the request was created?
Also is there a way to make a particular request not count towards keeping a session object alive (ex ajax requests with no user interaction)?