On Apr 7, 2005 9:10 AM, James Mitchell <[EMAIL PROTECTED]> wrote: > Like many of the Jakarta Commons projects, Commons Resources was based, in > part, from the initial work done in Struts and later copied over to commons > with the intent to one day use that library. This is what was done for > Beanutils, Digester, Validator, and more I'm sure. > > (Craig, correct me if I am wrong here) > MessageResources (the one in Struts) was created because ResourceBundle > (java api) did not provide the required functionality (at the time it was > needed).
Specifically, ResourceBundle is not Serializable, while MessageResources is. This was necessary to play nice with some app servers. > I have only had a cursory look at Configuration. From what I know of it, it > is a reusable library for getting configuration data into your application > (typically during startup). Commons Resources is a reusable library for > retrieving properties pairs (locale aware) for your application. I do not > know if Configuration is locale aware, but I suppose Commons Resources could > be extended (or changed) to use Configuration. > > The database extensions I did for Resources are specific to Resources, but > that can be changed if enough people think we should do that. > > I can see how Resources, I18N, and Configuration could play nice together in > providing i18n'd messages and configuration data. > > Would there be any interest in such an animal? Not from me. I'd rather see us focus on getting Commons Resources to 1.0 first. ;-) Do people really want localised config files? I'm not sure I see how it would even work. If I have "debug=true" in English, what would I have in the German config file? "(debug-in-German)=(true-in-German)"? How would the code know what to do with that? And please don't make me debug this stuff! ;-) -- Martin Cooper > -- > James Mitchell > Software Engineer / Open Source Evangelist > Consulting / Mentoring / Freelance > EdgeTech, Inc. > 678.910.8017 > AIM: jmitchtx > Yahoo: jmitchtx > MSN: [EMAIL PROTECTED] > > ----- Original Message ----- > From: "Benedict, Paul C" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[email protected]> > Sent: Thursday, April 07, 2005 9:59 AM > Subject: RE: RESEND: RE: Load message resources from DB??? > > > James, > > > > How much different is Common Resources from Common Configuration? In > > essence, a property file is really just a list of configuration pairs. > > > > Thanks, > > Paul > > > > -----Original Message----- > > From: James Mitchell [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, April 06, 2005 4:22 PM > > To: Struts Users Mailing List > > Subject: Re: RESEND: RE: Load message resources from DB??? > > > > > > ----- Original Message ----- > >> From: "Fogleson, Allen" <[EMAIL PROTECTED]> > >> To: "Struts Users Mailing List" <[email protected]>; > >> <[EMAIL PROTECTED]> > >> Sent: Wednesday, April 06, 2005 2:40 PM > >> Subject: RE: RESEND: RE: Load message resources from DB??? > >> > >> > >> Yes there is the OJBMessageResource class and I believe the same author > >> wrote a HibernateMessageResource class. The class I wrote is mostly a > >> "JNDIJDBCMessageResource" which has a timeout cache attached to it. The > >> config is comprised of three elements (comma separated) > >> 1) The JNDI Name of the datasource to use that maps to a table. > >> 2) The sql to use basically this sql relies on the fact that variable 1 > >> is > > > >> the locale, and variable 2 is the key . > >> 3) The time that the cached value previously retrieved from the DB is > >> valid. If this is 0 timeout is never. > >> > >> The ones mentioned in Bill's book are very good implementations but I > >> feel > > > >> that it is sometimes nicer to have an implementation that does not add > >> extra class libraries (i.e. OJB or Hibernate). If you are already using > >> one of those in your app I would say then use those Message Resource > >> extensions, but if you want something relatively simple that just uses > >> standard J2EE and the struts libs then use mine. (I really should get it > >> up on a site somewhere :) > >> > > > > Hi, I wrote OJBMessageResources a while back and it has not been updated > > since it was last published. > > > > Struts will soon be changing (1.3.something) the internal mechanism from > > MessageResources/PropertyMessageResources (and factory) to > > commons-resources. That's why I wrote 3 implementations for > > commons-resources: > > HibernateResources > > IBatisResources > > JDBCResources (not in CVS yet) > > > > http://cvs.sourceforge.net/viewcvs.py/struts/commons-resources-optional/ > > > > > > These are not released (because commons-resources has not been released, > > but > > > > it is out of the sandbox, which is a good thing), but I will publish and > > announce the extensions when it get's the 1.0 stamp of approval. > > > > > >> Al > > > > Thanks. > > > > > > -- > > James Mitchell > > Software Engineer / Open Source Evangelist > > Consulting / Mentoring / Freelance > > EdgeTech, Inc. > > 678.910.8017 > > AIM: jmitchtx > > Yahoo: jmitchtx > > MSN: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > ------------------------------------------------------------------------------ > > Notice: This e-mail message, together with any attachments, contains > > information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New > > Jersey, USA 08889), and/or its affiliates (which may be known outside the > > United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as > > Banyu) that may be confidential, proprietary copyrighted and/or legally > > privileged. It is intended solely for the use of the individual or entity > > named on this message. If you are not the intended recipient, and have > > received this message in error, please notify us immediately by reply > > e-mail and then delete it from your system. > > ------------------------------------------------------------------------------ > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
