Another scenerio:
In our projects, bad configured clustering caused ViewExpiredException.
It is not easy to find out the reason for this problem.

Regards,
Ali

2008/12/18 Simon Kitching <[email protected]>

> Vinaya Tirikkovalluru schrieb:
> >
> > Hi,
> >
> >
> >
> > We have upgraded from Tomahawk 1.1.6 to Tomahawk 1.1.8
> >
> > After this, we have been getting a lot of
> > javax.faces.application.ViewExpiredExceptions
> >
> > I was under the impression that
> > javax.faces.application.ViewExpiredException is caused only when the
> > session expires.
> >
> > Anybody else had this problem earlier?
> >
> > Could any one please tell me what are the other scenarios where this
> > is caused?
> >
> Firstly, note that this applies only when "server-side-state-saving" is
> enabled. A ViewExpiredException will never occur with
> "client-side-state-saving".
>
> Myfaces keeps a cache of previous views in the session. At the start of
> each render phase, a new "view key" is allocated, and written into a
> hidden field in the html form. At the end of the render phase, the
> current view is stored into the cache using that key.
>
> On postback, if the "view key" specified by the posted form data does
> not match any entry in the cache, then a ViewExpiredException is reported.
>
> The cache has a fixed size, so that a user session does not grow
> continuously; when a view is stored into a full cache, the oldest entry
> is discarded. This allows a fixed-size number of "back button" clicks to
> work (the submitted form will contain an old "view key"). The actual
> number is configurable.
>
> Unfortunately this approach does not work too well if an application has
> multiple windows open; there is still just one cache, so if one window
> is used repeatedly then it will eventually push the saved view for other
> open windows out of the cache; then submitting the other window will
> cause a ViewExpiredException. Unfotunately http provides no way to know
> which window is which, so it is not possible to have a per-window cache.
>
> But all this view-cache-management is done by the jsf core
> implementation, *not* tomahawk. So I cannot think why upgrading Tomahawk
> is causing problems for you. Hopefully the above info will help you
> figure out what the actual problem is..
>
> Regards,
> Simon
>
> --
> -- Emails in "mixed" posting style will be ignored
> -- (http://en.wikipedia.org/wiki/Posting_style)
>
>

Reply via email to