You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2002/02/11 11:18:06 UTC
DO NOT REPLY [Bug 6362] New: -
Multithreading problems during regeneration of sitemap
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=6362>.
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=6362
Multithreading problems during regeneration of sitemap
Summary: Multithreading problems during regeneration of sitemap
Product: Cocoon 2
Version: Current CVS
Platform: All
OS/Version: All
Status: NEW
Severity: Critical
Priority: Other
Component: core
AssignedTo: cocoon-dev@xml.apache.org
ReportedBy: cziegeler@apache.org
Hi,
I just found out this problem with the asynchronous sitemap generation:
If you change the sitemap in a running system the sitemap is regenerated
in the background. In the meantime all incomming requests are served with
the old sitemap until the new one is finished. This is nice.
But, if a new request enters the old sitemap and is in the processing of
this
sitemap and if at the same time the regeneration is finished, the old
sitemap
is released by the sitemap.handler class.
>> taken from the run() method <<
if (this.sitemap != null) {
programGenerator.release((CompiledComponent)this.sitemap);
}
<<
This release causes a dispose on the Sitemap object which in turn resets the
sitemap object and for example sets the manager to null.
But the new requests is currently processing with the old sitemap object
which
then results sooner or later with a NPE (as the manager is now null).
This is easily reproducable. just change the sitemap and hit several times
on
reload.
Now, I see two solutions:
a) Each request looksup and releases the sitemap, so the release in the
run()
method of the handler will not dispose the old sitemap until all requests
still
using that old sitemap are finished.
b) Remove the asynchron regeneration.
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org