tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36541] - session getAttribute/setAttribute and removeAttribute are NOT Thread safe.
Date Thu, 08 Sep 2005 16:14:37 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36541>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36541





------- Additional Comments From darryl@darrylmiles.org  2005-09-08 18:14 -------
Bear in mind if you are using clustering, you have to put the modified session
attribute after you have finished modifying the object and wish the new state to
persist for the next request, as clutering replication only takes place at
setAttribute() time.  So the 1000:1 may only be realistic for those users.


Also with the other issue of getting a null back when you expected to see an
object.  Session data does not stay around forever, it expires so all web-apps
must deal with the no session situation.  So I'd agree that so long as your
servlet still holds the exact Session object instance you did a setAttribute()
on you can reasonable expect a getAttribute() on it exist.

But between requests you let go of the instance, and leave it upto the container
session manager to hold onto.

If as comment #44 implies you are talking minutes later, then I read into that
you mean across requests.  Well there is no garuntee your session still exists
so your web-app must deal with that situation.

But you should not need to deal with seeing an old overwritten value turn up
again, that would be a problem.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message