You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Renzo Tomaselli <re...@tecnotp.it> on 2006/12/19 17:19:17 UTC

[Trinidad] missing FacesContext while deserializing

Hi, once more while adapting to Trinidad an existing application (Tomahawk +
Facelets):  
a request-scoped bean LoginBean was made persistent across requests through
Tomahawk t:saveState.  
Thus LoginBean exports a deserialization method such as:  
  
private void readObject(java.io.ObjectInputStream aInputStream) {  
        FacesContext fc = FacesContext.getCurrentInstance();  
...  
At application startup I see a LoginBean deserialized first, but there is no
FacesContext at that time, since fc = null.  
This used to work fine before extending web/faces-config to Trinidad.  
Any idea ?  
Thanks -- Renzo  
  
  
  
  


Re: [Trinidad] missing FacesContext while deserializing

Posted by Adam Winer <aw...@gmail.com>.
You can't really do this - serialization + deserialization can happen without
any FacesContext present.  I think Tomahawk has a setting
to force serialization up front, during the JSF lifecycle - we
don't have this, as it is a major performance hit to have
to enable this.

-- Adam


On 12/19/06, Renzo Tomaselli <re...@tecnotp.it> wrote:
>
>  Hi, once more while adapting to Trinidad an existing application (Tomahawk
> + Facelets):
>  a request-scoped bean LoginBean was made persistent across requests through
> Tomahawk t:saveState.
>  Thus LoginBean exports a deserialization method such as:
>
>  private void readObject(java.io.ObjectInputStream aInputStream) {
>          FacesContext fc = FacesContext.getCurrentInstance();
>  ...
>  At application startup I see a LoginBean deserialized first, but there is
> no FacesContext at that time, since fc = null.
>  This used to work fine before extending web/faces-config to Trinidad.
>  Any idea ?
>  Thanks -- Renzo
>
>
>
>
>