struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <craig...@gmail.com>
Subject Re: Dynamic MessageResources ???
Date Fri, 07 Jan 2005 18:57:24 GMT
On Fri, 7 Jan 2005 10:47:34 -0800, Dakota Jack <dakota.jack@gmail.com> wrote:
> What is the reason why ModuleConfigImpl freezes mrconfig?  Would there
> be some difficulty in making message resources dynamic?

Same reason as for freezing all the other config objects ... so that,
at runtime, you can do get() operations on the HashMaps inside with no
synchronization locking overhead.  By themselves, HashMaps are not
threadsafe, so if you allow dynamic modifications, you'll need to do
locks around every single read (which happen a lot).


> 
> Jack
> 

Craig

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


Mime
View raw message