tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <cmcclana...@mytownnet.com>
Subject Re: Cleanup: sessions
Date Fri, 07 Jan 2000 20:46:43 GMT
Costin.Manolache@eng.sun.com wrote:

> > Is it necessary to pass the response here in order to create the session?  I
> > was under the impression that the Request itself already knew which Response
> > it was associated with, and you could therefore follow the chain if you
> > really needed to (for setting the cookie, for example).
>
> Well, there is a reason to pass both - the method might affect the response,
> and it is important to have this clear in the signature instead of having a
> side effect.
> Also, both Request and Response are available - I see no reason to add an
> extra request.getResponse() ( that will be needed since response is allways
> used to create a new session)
>

That's a good enough reason for me.

>
> > >
> > >     public void accessed(HttpSession session);
> >
> > This updates the "last accessed time" value, right?
>
> Yes.
>
> Also note that a SessionManager needs to use the public methods in
> Request/Response.
>
> If you need more - you can make more methods public, but with a lot of care
> as this will affect the interfaces we'll put on Request/Response.
>

I will take a look tonight ... we can walk that tightrope an inch at a time.

>
> Costin
>

Craig



Mime
View raw message