----- Original Message -----
From: "John Colvin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 15, 2001 5:43 PM
Subject: Re: Multiple Languages


> Hi
>
> String lang = (String) session.getAttribute("UserLanguage");
> Properties props = (Properties)
session.getAttribute("LangaugeProperties");
>
> String title = props.getProperty(lang  + "_TITLE");
>
Its ok to use it as a quick hack, but Properties shouldn't be 
used if
optimal performance is required.
The problem is that props.getProperty is threadsafe (Properties 
extends
hashtable), so imagine if we have 20 threads concurrently 
rendering the same
page, and all of them need to access the same Properties object 
multiple
times in one pass. Thats a lot of waiting.

- Kasper


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to