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 Tue, 05 Apr 2005 15:04:37 GMT
Superb. Thanks!


Emmanuel Bourg wrote:
> When the FileChangedReloadingStrategy is used the method 
> reloadingRequired() is called every time a property is accessed. This 
> method checks if the file has changed according to its last modified 
> time (File.lastModified() is called), but it will not perform this check 
> if it has already been made recently (the exact delay is set by 
> setRefreshDelay). If reloadingRequired() returns true, the configuration 
> is cleared and loaded again.
> 
> So the performance depends on the refreshDelay and the time required to 
> load the configuration, this is typically linked to the size of your file.
> 
> Emmanuel Bourg
> 
> 
> WANG Qingtian wrote:
> 
>> Hello Emmanuel,
>>
>> Thanks very much for the clarification! Can you also shed some light 
>> on the performance issue when the reloading mechanism is used versus 
>> when not used?
>>
>> Thanks again!
>> Qingtian
>>
>>
>>
>> Emmanuel Bourg wrote:
>>
>>> Hello Qingtian, a reloading strategy is passive, it doesn't spawn a 
>>> thread to monitor the file, instead it checks if the file changed 
>>> everytime a property is accessed. So just use it as a replacement for 
>>> java.util.Properties.
>>>
>>> Emmanuel Bourg
>>>
>>>
>>> WANG Qingtian wrote:
>>>
>>>> Hi,
>>>>
>>>> Is the reload strategy implemented by creating a thread that 
>>>> periodically checks the time stamp of the configuration file? If so, 
>>>> how do I make sure that thread is started/stopped properly when I 
>>>> use it in a j2ee container? Like, will the thread be killed when I 
>>>> shut down the web/ejb container? What is the "best practice" of 
>>>> using "configuration" in a j2ee container?
>>>>
>>>> Thanks a lot for your help!!!
>>>> Qingtian
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
> 
> ---------------------------------------------------------------------
> 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