For those interested...

If the spec were to change so that SerializedView was a *static* inner
class and implemented serializable, then we could store it in the
session with no serialization problems.

Static inner classes do not contain references to the enclosing
object.  If the inner class has no need for the enclosing object it
should be declared as static.  "Maintaining this reference costs time
and space with no corresponding benefits."  (Effective Java, p. 92)

I'll suggest this modification to the JCP.

sean


On Mon, 17 Jan 2005 10:29:03 -0500, Sean Schofield
<[EMAIL PROTECTED]> wrote:
> No we can't do this.  SerializedView cannot be serializable because it
> is defined by the spec as not being serializable.
> 
> Out of curiosity, how would we do this anyways?  The reference to the
> parent class is implicit.  Its not explicitly defined, so how could I
> make it transient?  I'm not saying its impossible, just that I'm
> unaware of this trick.
> 
> sean
> 
> 
> On Mon, 17 Jan 2005 08:16:04 +0100, Martin Marinschek
> <[EMAIL PROTECTED]> wrote:
> > I just read your bug report - shouldn't it be enough to make the
> > reference to the parent transient?
> >
> > regards,
> >
> > Martin
> >
> >
> > On Sun, 16 Jan 2005 12:27:55 -0500, Sean Schofield
> > <[EMAIL PROTECTED]> wrote:
> > > I finally figured this all out.  This bug
> > > (http://issues.apache.org/jira/browse/MYFACES-75) should be closed as
> > > WON'T FIX.  I've opened a new bug
> > > (http://issues.apache.org/jira/browse/MYFACES-81) that describes the
> > > true nature of the problem (and contains a patch).
> > >
> > > sean
> > >
> >
>

Reply via email to