cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject [BUG]: Multithreading problems during regeneration of sitemap
Date Wed, 06 Feb 2002 13:48:37 GMT

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
sitemap and if at the same time the regeneration is finished, the old
is released by the sitemap.handler class.

>> taken from the run() method <<
            if (this.sitemap != null) {

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

Now, I see two solutions:
a) Each request looksup and releases the sitemap, so the release in the
method of the handler will not dispose the old sitemap until all requests
using that old sitemap are finished.
b) Remove the asynchron regeneration.

Any suggestions?


To unsubscribe, e-mail:
For additional commands, email:

View raw message