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 12:18:53 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 mario@ops.co.at  2005-09-08 14:18 -------
> Overall, it means it's not
> portable, and the webapp really should plan on syncing on the session externally
> wherever needed.
If you use different techniques this might become pain.
It might be hard to tell everyone to synchronize against session, and in the end
you have the same as synchronize in the base class. Well not really the same as
tomcat can synchronize against the map, we have to synchronize on a wider
context - the session.

> What I am willing to provide (this is the intent of the code in
> 5.5.x right now), by default, is making sure the HashMap cannot get corrupted,
> and that the infinite loop described in this report cannot occur.
I wonder how this can be done?
You might have to introduce your own map implementation, no?

Is it possible to create a thread-safe hash-map without synchronization?
Ok, if two threads put in an element with the same key it might not be
deterministic which of both are really set then, but this is not the problem we
have to solve.

-- 
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