You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by vo...@basf-it-services.com on 2003/11/05 09:47:38 UTC

WARNING releasing ComponentsSelector

found the reason for this WARN:

WARN    (2003-11-05) 09:13.24:667   [core.manager]
(/wa/ProductSearch/Global) Se
rvlet.Engine.Transports : 11387/ExcaliburComponentManager: Attempted to
release
a org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector but
its
handler could not be located.

This only happen using SitemapSource which is inside a Subsitemap which
uses a Generator/Transformer.... which is defined inside this Sitemap.
Ok what happen:

Inside the SitemapSource.init() the first step is "this
.processor.buildPipeline(this.environment);" this builds the pipeline
calling the TreeProcessor which mounts the Subsitemap and recompose the
ProcessingPipeline to the CM of the SubSitemap. The ComponentsSelector is
lookup .....
If the build of the pipeline is finished, the MountNode do following:

// Recompose pipelines which may have been recomposed by subsitemap
context.recompose(this.manager);

So, now the CM inside the AbstractProcessingPipeline is not the CM of the
SubSitemap anymore. A later process of the pipeline and a release doesn't
set the CM back to the CM of the SubSitemap. This will end in the WARN you
see above, because the ComponentsSelector isn't released to the correct CM.

I did a quick fix, that I remember the CM in the first lookup to a
ComponentsSelector and set it to null in the recycle.

What do you think?

Volker



RE: WARNING releasing ComponentsSelector

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Volker Schmitt wrote:
>
> found the reason for this WARN:
>
> WARN    (2003-11-05) 09:13.24:667   [core.manager]
> (/wa/ProductSearch/Global) Se
> rvlet.Engine.Transports : 11387/ExcaliburComponentManager: Attempted to
> release
> a
> org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector but
> its
> handler could not be located.
>
> This only happen using SitemapSource which is inside a Subsitemap which
> uses a Generator/Transformer.... which is defined inside this Sitemap.
> Ok what happen:
>
> Inside the SitemapSource.init() the first step is "this
> .processor.buildPipeline(this.environment);" this builds the pipeline
> calling the TreeProcessor which mounts the Subsitemap and recompose the
> ProcessingPipeline to the CM of the SubSitemap. The ComponentsSelector is
> lookup .....
> If the build of the pipeline is finished, the MountNode do following:
>
> // Recompose pipelines which may have been recomposed by subsitemap
> context.recompose(this.manager);
>
> So, now the CM inside the AbstractProcessingPipeline is not the CM of the
> SubSitemap anymore. A later process of the pipeline and a release doesn't
> set the CM back to the CM of the SubSitemap. This will end in the WARN you
> see above, because the ComponentsSelector isn't released to the
> correct CM.
>
> I did a quick fix, that I remember the CM in the first lookup to a
> ComponentsSelector and set it to null in the recycle.
>
> What do you think?
>
Thinking more and more about it, recomposing the pipeline in the finally
clause of the MountNode is wrong and could be removed without affecting
other parts.
If a sub sitemap is mounted the pipeline gets the manager of this
sub sitemap which is a child of the manager of the main sitemap.
Currently, in the finally clause, the pipeline is reset and gets
the parent again. If this is not done, the pipeline still holds
the child. Releasing a component using the child instead of the
parent should work anyway.

So what do you think?

Carsten