dev@glassfish.java.net

Re: JSF Server State saving issue and propsed fix

From: Arjan Tijms <arjan.tijms_at_m4n.nl>
Date: Thu, 8 Mar 2012 08:58:25 +0100

Hi,

On Wed, Mar 7, 2012 at 9:32 PM, Manfred Riem <manfred.riem_at_oracle.com>wrote:

> Hi everyone,
>
> In the case of server side state saving with JSF we are thinking of
> acquiring
> the session eagerly (before any content is being written) so we can take
> care
> of the following issues:


The change bundle in 2277 now always creates a session for every page if
state is server side. I remember there was a bug in the early Mojarra 2.0x
builds that did almost this (
http://java.net/jira/browse/JAVASERVERFACES-1842) and that obviously was a
problem for some.

We for instance operate a public site build where we're careful not to
create sessions on the most common pages, but when the user eventually does
hit a page where a session is required, we would prefer state to be kept
server side.

Would it be an option to only eagerly create the session after building the
component tree when you discover it contains one or more forms? At that
point no data should have been written to the response either.

Kind regards,
Arjan