On 9/7/05, Jason Lea <[EMAIL PROTECTED]> wrote: > > :( > > I wonder if the new java.util.concurrent classes could be used instead > of simple HashMap? > > > http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html
This would definitely be feasible for Tomcat 5.5 (which already has a dependency on Java SE 5). but that would mean total dependence on j2se 1.5 and that would be a > problem for supporting j2se 1.4, though a backport is being worked on here > > http://www.mathcs.emory.edu/dcl/util/backport-util-concurrent/ Makes sense to consider this for Tomcat 5.0 (although it may well be that the performance hit is low enough to make this extra work unnecessary). other reading here: > > http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html > > > > > I think that sort of thing would provide a nice solution for speed + > reliability. Craig Leon Rosenberg wrote: > > >to whom it may concern > > > >There is a serious bug in tomcat 5. To make it short, if you write to or > >read from session (taglibs included) and have a chance that there is more > >than one request from same user currently proceeded on the server (and it > >can be just a web-page refresh, our beloved F5 key) you are f**ked. > > > >What happens is that the HashMap where the session attributes are stored > got > >corrupted, and the entry.next in the HashMap points to itself (or start > of > >the list). Next request to the session.getAttribute results in an endless > >loop, and your server has 100% cpu load. > > > >You can read full bug description at: > > > >http://issues.apache.org/bugzilla/show_bug.cgi?id=36541 > > > > > >What does it mean for us, struts-users? > >If we use the session scope: > > > >1. Struts-taglibs aren't thread-safe. > > > >2. Application that are working under tomcat 4.1 or resin, or probably > any > >other servlet container will not work under tomcat 5 (or are not > reliable). > > > >3. We must forbid users to have multiple browsers open. > > > >4. We can't handle multiple frames or concurrent requests from same user > / > >session. > > > >5. ... many other examples available. > > > >affected versions: > >5.0.19+ > >5.5.x > > > > > >If you ever had actions hanging around in > >session.getAttribute()/HashMap.get() for hours and don't know why -> it's > >your bug. > > > >What can you do: > > > >Please, click the bug link > >(http://issues.apache.org/bugzilla/show_bug.cgi?id=36541) and read it ALL > >carefully. Decide whether you may or may not be affected by this issue. > >If you are affected by this issue, and most of us are affected, log in > and > >vote for the bug. If you don't have a bugzilla account, but are affected > by > >this bug: setup a bugzilla account and vote. > > > >Similar request has been started by Wade Chandler at tomcat-users list. > > > >regards > >Leon > > > >P.S. One more thing, could struts-developers team supply a patch for > tomcat > >5.0.x and 5.5.x for download on the struts homepage? surrounding calls to > >attributes hashmap with synchronized(attributes){} as it was done in > 4.1.x > >is sufficent. > > > > > > > > > > > > > > > > > > > > > > -- > Jason Lea > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >