Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 23697 invoked from network); 2 Sep 2002 23:53:48 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Sep 2002 23:53:48 -0000 Received: (qmail 27189 invoked by uid 97); 2 Sep 2002 23:54:14 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 27173 invoked by uid 97); 2 Sep 2002 23:54:13 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 27161 invoked by uid 98); 2 Sep 2002 23:54:13 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <3D73F9E5.3090004@xenonsoft.demon.co.uk> Date: Tue, 03 Sep 2002 00:53:09 +0100 From: "Peter A. J. Pilgrim" Organization: XeNoNSoFT User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: [New Functionality] ApplicationResources.properties to DB? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Ian Vellosa wrote: > But what do you do each time you add a new language, say German? you need to > update the database structure adding a new column? Surely any solution > should be generic enough not to need that. > > Unfortunately you would need the table to look something more like: > > key language value > ------------ -------- ---------------- > global.title en Something > global.title fr quelque chose > > but that will get huge in no time at all! and I doubt that performance would > be too good. > Yes The db column design was wrong. Well how many resources do have or do you need? Surely you can read the message resource into memory java objects just once. When you host the web application it is not going to have just 64MB more like close to 1024 MB of RAM, man! Message Resources are almost singletons anymore. Therefore you cache the message resource in memory and do not query the database anymore unless you really to have ``dynamic message resources''. Now there's an idea that you can't do with the current static message resources ? -- Peter Pilgrim +-----\ +-++----++----+ Java Technologist | | | || || | 'n' Shine | O | | || --+| ---+ /\ | ._ / | | \ \ | | / \ | | \ \ | |+-- || ---+ A new day /_ _\ "Up" | | | | | || || | is coming || +-+ +-+ +-++----++----+ -- To unsubscribe, e-mail: For additional commands, e-mail: