commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Soaring Eagle <comfortable.n...@gmail.com>
Subject Re: Configuration - Reload Strategy in j2ee containers
Date Wed, 06 Apr 2005 21:37:07 GMT
Thanks Emmanuel. But how does commons cache this timestamp? If it is a
singleton, how does commons ensure that the instance is always in
memory? For example, such a time interval could be set to many days
(concievably). How do ensure that the instance is not garbage
collected before the interval arrives?

On Apr 6, 2005 4:42 PM, Emmanuel Bourg <ebourg@apache.org> wrote:
> Soaring Eagle wrote:
> 
> > How does commons configuration determine when the interval is done
> > without caching at least the timestamp of the last read? In other
> > words, without threading, how does commons cache any data? If I know
> > how, then I will surely use this feature from commons rather than
> > writing my own logic.
> 
> Commons Configuration keeps the timestamp of the last file check. On
> accessing a property (by calling getString(), getInt(), etc), the file
> is checked again if a specified delay is elapsed since the last check.
> Of course the configuration is not reloaded after this delay if the file
> didn't change.
> 
> Emmanuel Bourg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
>

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


Mime
View raw message