I'm pretty sure we can't do that transparently unless we do some
bytecode magic. As for bind(); dirty(); i think just bind() should be
enough. If it's not perhaps we should make it mark the session dirty,
as it is imho pretty obvious that something have changed in the
session so that you want to bind it.

-Matej

On 7/29/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> On 7/29/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > On 7/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > >         /**
> > > -        * Marks session state as dirty
> > > +        * Marks session state as dirty. THIS METHOD SHOULD TYPICALLY NOT
> > > BE CALLED
> > > +        * BY CLIENTS; IT IS USED FOR INTERNAL BOOK KEEPING.
> > >          */
> > >         public final void dirty()
> > >         {
> >
> >
> > is that right? dirty() is there partially for clients. for example:
> >
> > class mysession extends websession {
> >   int a=0;
> >
> >   public void increment() {
> >     a++;
> >    dirty();
> >   }
> > }
> >
> > that dirty call in there is necessary in order to mark the session as dirty
> > so it is pushed into httpsession. so it is there for clients, and they do
> > have to call it. or am i missing something?
>
> Yeah, I guess you're right. Which means that it should really be:
>
> class mysession extends websession {
>  int a=0;
>
>  public void increment() {
>    a++;
>   bind();
>   dirty();
>  }
> }
>
> unless you are certain that the session is already bound. It's pretty
> ugly. Would be nice if we could do this transparently somehow.
>
> Eelco
>

Reply via email to