Paulo Gaspar wrote:
> 
> In the ResourceManager class,
>   resource.process()
> was always (twice) called before the function call
>   resourceLoader.getLastModified( resource )
> that gets the resource timestamp.
> 
> The problem is that if (with loads of bad luck) the
> resource is updated between these too calls, the old
> resource version data would be associated with the
> newer version timestamp.

Yes, that would be loads of bad luck.  But its true - its possible.

> 
> The consequence is that the subsequent timestamp
> checks on the resource would give it has not changed.
> 
> These patch is not ideal but it is what is possible
> with the current architecture (*). It simply consists
> in an order change - getting the timestamp before
> loading the resource.
> 
> Its worse case is that a new version of the resource,
> changed (again) between the 2 calls will be loaded
> twice - because of the new version data being
> associated with the old timestamp.

Right - and that is acceptable as it beats the other issue, of not
having the most up-to-date resource data.
 
> However, this just results in redundant work on the
> very-bad-Murphy-at-work case instead of deficient
> functionality (e.g.: an updated template not being
> reloaded).
> 
> As mentioned before, be aware that text newline
> sequences might be wrong for Linux (I'm not sure).
> And I am sure it will need some editing to work.

You should give Linux a whirl.  You can't beat the pricepoint...
 
> Can some one fix it and apply it?

Done.
 
> Thanks and have fun,

Always do.

geir

-- 
Geir Magnusson Jr.                               [EMAIL PROTECTED]
Developing for the web?  See http://jakarta.apache.org/velocity/

Reply via email to