tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: retrieving two different objects from session (should be thesame)
Date Thu, 08 May 2008 15:20:34 GMT
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Subject: Re: retrieving two different objects from session 
> (should be thesame)
> 
> My tenuous understanding of session handling in Tomcat 
> is that HttpServletRequest.getSession roughly returns:
>
> new StandardSessionFacade(theRealSessionObject)

Don't think so.  I just took a look at the code, and it appears to me
that the facade is only created once per session, not once per
getSession() call.

I did think of another issue with this situation:  if the attribute
under discussion is only relevant for one particular request, it's a
design flaw to store it in the session.  It should be saved in the
request instead, thereby avoiding any concurrency issues.  Since the OP
didn't really give us much information about the lifetime of the
attribute, I just assumed it had session scope.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message