struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srikanth Gubba <sgu...@lylesdata.com>
Subject RE: Application.properties
Date Tue, 16 Sep 2003 12:27:42 GMT
James,

Can you please help me with the changes that I can make to the
DBMessageResources so that it would work without reloading the appliation. I
know that you were working on this earlier but not sure if you had a chance
to complete making the changes to new OJB version.

Thanks in adv
srikanth

-----Original Message-----
From: James [mailto:jmitchell@apache.org]
Sent: Monday, September 15, 2003 2:18 PM
To: 'Struts Users Mailing List'
Subject: RE: Application.properties


That's one way to do it.  Although doing so will create a compile-time
dependency on using that class (whether you actually use it or not).

By default, the Struts MessageResources API does not allow for reloading
and given the nature of the implementation.  Since the returned messages
from your subclass are cached, you must clear the (cached) map of
formatted messages with each call to your implementation's getMessage
method or the MessageResources won't bother to call your method again
(until you reload the app).

This was a very frustrating feature that I had to overcome with my
DBMessageResources implementation and one of the reasons I chose OJB for
the underlying data access (configurable caching, etc).


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx




> -----Original Message-----
> From: Paananen, Tero [mailto:Tero.Paananen@GTECH.COM] 
> Sent: Monday, September 15, 2003 1:49 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Application.properties
> 
> 
> > Please suggest some ideas or code which will help in creating 
> > an extension
> > so that the properties can be loaded from database dynamically.
> 
> Extend the message resources class you're currently
> using and implement a reload() (or whatever) method
> in your extended class. Call the reload() method
> when appropriate.
> 
> 				-TPP
> 
> -----------------------------------------
> This email may contain confidential and privileged material 
> for the sole use of the intended recipient(s). Any review, 
> use, retention, distribution or disclosure by others is 
> strictly prohibited. If you are not the intended recipient 
> (or authorized to receive for the recipient), please contact 
> the sender by reply email and delete all copies of this 
> message.  Also, email is susceptible to data corruption, 
> interception, tampering, unauthorized amendment and viruses. 
> We only send and receive emails on the basis that we are not 
> liable for any such corruption, interception, tampering, 
> amendment or viruses or any consequence thereof.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


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


Mime
View raw message