commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WANG Qingtian <qingtian.w...@gmail.com>
Subject Re: Configuration - Reload Strategy in j2ee containers
Date Wed, 06 Apr 2005 20:46:20 GMT
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? 

I am not sure.... but if you have a Singleton that has a field storing 
the last systime the reload was done, when the "getXXX()" is called, it 
could do something like

if (currentSystime - this.lastTimeReload > setInterval) {
	reload();
	return somethingNewlyCached;
} else {
	return somethingAlreadyCached;
}

Again since I didn't look at the code, I am just guessing out of 
nowhere.... :)


> If I know
> how, then I will surely use this feature from commons rather than
> writing my own logic.
> 
> I use eclipse to start or stop my container. I will surely test all
> this with other means. I doubt though that this will be a major issue.

Appreciate it if you'd let me know how that turns out and the specific 
container you use when all this happens.

Thanks!
Qingtian



---------------------------------------------------------------------
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