Details
Description
With a stock Mojarra application, when a session expires there are different behaviours depending on how the session expiry was triggered and whether or not Ajax and ICEfaces are involved. More detailed information is available in http://jira.icefaces.org/browse/ICE-5997.
In any event, most session expiration ends up triggering a ViewExpiredException. It would be better to handle actual session expiration in a more explicit way. This involves accurately determining when a session expiry has occurred and then allowing that information to be handled by the server and/or client as appropriate.
In any event, most session expiration ends up triggering a ViewExpiredException. It would be better to handle actual session expiration in a more explicit way. This involves accurately determining when a session expiry has occurred and then allowing that information to be handled by the server and/or client as appropriate.
Issue Links
- depends on
-
ICE-6004 Add a custom ExceptionHandler to help with server side exception handling.
- Closed
I added a custom ExceptionHandler to help turn ViewExpiryExceptions into SessionExpiredExceptions when a view can't be found during the Restore View phase - this is typically because the session is either invalid or new.
I also tweaked the existing logic around using push and the resource handler to use the SessionTimeoutListener that we already had to invalidate the session and use Push if it's available. This puts the code in a more logical place and we now see, if ICEpush is running, Session Expired messages pushed to all views of that session.