commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mitchell" <jmitch...@apache.org>
Subject [resources] was: Re: RESEND: RE: Load message resources from DB???
Date Thu, 07 Apr 2005 16:10:05 GMT
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).

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?



--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   jmitchell@apache.org




----- Original Message ----- 
From: "Benedict, Paul C" <paul_benedict@merck.com>
To: "'Struts Users Mailing List'" <user@struts.apache.org>
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:jmitchell@apache.org]
> 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" <allen.fogleson@daugherty.com>
>> To: "Struts Users Mailing List" <user@struts.apache.org>;
>> <werner@sonoma.edu>
>> 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:   jmitchell@apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
> ------------------------------------------------------------------------------
> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 



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


Mime
View raw message