You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Shepherd, Darren S " <da...@citi.com> on 2007/09/20 15:40:49 UTC
Multithreaded use of HashMap
I noticed two different cases where a HashMap is being used in a multithreaded read/write manner. As we all know the java HashMap implementation does not allow concurrent read/writes that are not externally synchronized. Is there some reason I should not be concerned? The classes are OgnlUtils and SpringObjectFactory. Both classes are actually xworks API. Is xworks a different project? Should this question be directed towards a different list?
Darren
Re: Multithreaded use of HashMap
Posted by Don Brown <mr...@twdata.org>.
OgnlUtil properly protects its caches by surrounding them in
synchronized blocks, but you are right, the SpringObjectFactory class
does not. I fixed it in trunk.
Don
On 9/20/07, Shepherd, Darren S <da...@citi.com> wrote:
> I noticed two different cases where a HashMap is being used in a multithreaded read/write manner. As we all know the java HashMap implementation does not allow concurrent read/writes that are not externally synchronized. Is there some reason I should not be concerned? The classes are OgnlUtils and SpringObjectFactory. Both classes are actually xworks API. Is xworks a different project? Should this question be directed towards a different list?
>
>
>
> Darren
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org