You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Srikanth Gubba <sg...@lylesdata.com> on 2003/09/16 14:27:42 UTC

RE: Application.properties

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


RE: Application.properties

Posted by James <jm...@apache.org>.
My time is very limited at the moment.  I'll try to find some time for
this today or tomorrow.  

I apologize for putting you off so long.  I'm currently billing ~55
hours at my current gig, coaching 2 of my 3 kids soccer teams, running
the struts-atlanta users group, and tech editing 2 new books (a Struts
book and a JSF book).

If anyone else has a free minute so spare, that would be great.


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




> -----Original Message-----
> From: Srikanth Gubba [mailto:sgubba@lylesdata.com] 
> Sent: Tuesday, September 16, 2003 8:28 AM
> To: 'struts-user@jakarta.apache.org'
> Cc: 'jmitchell@apache.org'
> Subject: RE: Application.properties
> 
> 
> 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
> 


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