tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Rosenberg" <>
Subject AW: Tomcat/JVM hangs in session.getAttribute / HashMap.get()
Date Wed, 07 Sep 2005 19:35:10 GMT

> -----Urspr√ľngliche Nachricht-----
> Von: Wade Chandler [] 
> Gesendet: Mittwoch, 7. September 2005 21:11
> An: Tomcat Users List
> Betreff: Re: Tomcat/JVM hangs in session.getAttribute / HashMap.get()
> Should be enough to explain the issue and why synchronization 
> should be used.  I haven't looked at the Tomcat code, but why 
> would a Session not use synchronized maps?  In my opinion 
> it's not a bug in HashMap as it's up front about it not being 
> synchronized.  To fix the original posters current situation 
> they should be able to synchronize on an object when 
> accessing the'll just have to track down all of 
> your calls which are setting and getting attributes and 
> synchronize the code.

Unfortunately no. Not only you have to rewrite all your calls to the
session, you also have to rewrite all 3rd-party taglibs like struts,
tapestry, pager, jstl or whatever you are using. Each getAttribute must
become synchronized.
It is simply not possible to fix it, without patching tomcat.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message