You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/10/27 15:13:21 UTC

DO NOT REPLY [Bug 24147] New: - No way to safely retrieve session attributes

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24147>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24147

No way to safely retrieve session attributes

           Summary: No way to safely retrieve session attributes
           Product: Tomcat 4
           Version: 4.1.12
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: cdsmith@twu.net


I've got an intermittent bug in a web application due to the fact that it uses 
HttpSession.getAttributeNames to iterate over session attributes.  If another 
servlet request in the session sets or removes an attribute during this time, 
then a ConcurrentModificationException is thrown.  There seems to be no other 
safe means of safely retrieving the attributes of the session, however.  So 
I'm stuck with an ugly retry strategy where I keep trying until I don't get a 
ConcurrentModificationException.

Perhaps this should be taken into account when determining whether to use fail-
fast iteration for implementing this method.

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