Pregunta

I believe the following is true

  • if javax.faces.STATE_SAVING_METHOD is set to client, then the view never expires
  • a ViewExpiredException will be thrown
    • if javax.faces.STATE_SAVING_METHOD is set to server and the view state is not available
    • when the session is destroyed (because all the views saved in the session will logically also be expired at the same time)
    • when a value is set for com.sun.faces.clientStateTimeout (defaults to NONE) and the time between requests exceeds this configured time

I don't know

  1. what are the reasons for view state not beeing available anymore (eexcept session timeout)?
  2. is there any time value that can be configured to control view state timeout?

Thank You

Related:

¿Fue útil?

Solución

The answers to your questions are in the links you've posted. I'll distill them out for you here:

  1. what are the reasons for view state not beeing available anymore (eexcept session timeout)?

    There is a number of viewstate items that will be held per session. Should there be a need to add a new viewstate object, a pre-existing instance of the Viewstate object is removed from the viewstate map, using the Least Recently Used algorithm. This is the only other reason (I'm aware of) that will cause a given viewstate object to expire. Bear in mind this affects only specific viewstate objects stored in the viewstate map, not the map as a whole

  2. is there any time value that can be configured to control view state timeout?

    Based on my research, I see no context param either in the spec or implementations that provide this. So currently, the only way to control the timeout of viewstates is to control session timeout

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top