cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 20682] - Generator "directory": "dateFormat" is buggy
Date Thu, 12 Jun 2003 16:25:17 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20682

Generator "directory": "dateFormat" is buggy

kowa@fh-augsburg.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CLOSED                      |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From kowa@fh-augsburg.de  2003-06-12 16:25 -------
The behaviour described seems to be due to an error of the caching
algorithm. It cannot always be reproduced. After some testing I
found a solution to this and other similar problems.
However, as a cocoon newbie I do not really know the
new Cocoon caching mechanism. So my "solution" could be
wrong.

The method getValidity is called twice for a single
document (I dont't know why). In the current implementation
these two calls deliver two different validity objects. 
The first one contains an empty file list, the second one
contains the correct file list. Whenever a file or directory
is modified, Cocoon deletes the second validity object
and uses the first one for further testing. As the file
list is empty, isValid always returns 1. Thus, further changes
are not regognized.

My solution is to return the same validity object
for all getValidity calls sent to an DirectoryGenerator object:

public SourceValidity getValidity()
{
  if (this.validity == null)
    this.validity = new FilesValidity(this.refreshDelay);
  return this.validity;
}

Mime
View raw message