2
votes

I've come across many solutions for the two 'huge' problems

  • Session Expired
  • ViewExpiredException

My Question: What is the difference between them?

I'm using WAS and I observed

  • Restarting the EAR in the console does not cause the session to expire
  • If there is a current ajax request and the EAR is restarted it throws ViewExpiredException but does not logout the user
  • If the page is idle for, say 30 min, the login screen appears (I've used a sessiontimeoutfilter to handle this)

So isnt ViewExpiredException same as Session Expiry? Also why doesnt restarting the EAR cause the session to expire?

Any help would be appreciated.

1
i missed that question. thanks for the link BalusC! - rottweiler
restarting doesnt kill the session as it is persisted by your app server by way of serialization. - Mark W

1 Answers

0
votes

Setting javax.faces.STATE_SAVING_METHOD to client will solve the problem. Also using an ExceptionHandler and NoCacheFilter will solved the problem

I prefered the latter, since it is more maintainable.

See