On 05.03.2008 11:19, Felix Knecht wrote:
We are encountering this same problem in Cocoon 2.1.11. What is the
status of this issue? Is there a fix for it? It doesn't seem to
exist in Cocoon 2.0.4.
Obviously net yet, otherwise you could see it in the issue tracker.
Maybe BufferedOutputStream was introduced after cocoon 2.0.4 so that
version doesn't suffers this issue.
I've looked into this issue and I'm against Felix' fix. It stands
completely against the idea of buffering the whole pipeline content
which is done for error handlers. It should be possible for them to
reset the OutputStream. Or asked in other words? Why using the
non-flushing BufferedOutputStream at all?
Now how to handle the issue with huge resources? Should be quite easy.
From what I see from the code (AbstractProcessingPipeline) it is
possible to configure and setup/parameterize a pipeline with
"outputBufferSize". This means on both map:pipe and map:pipeline it
should be possible to set an actual buffer size. Only if none is set
(and it defaults to -1) the non-flushing BufferedOutputStream is used.
Root sitemap has this example (in map:components/map:pipes section):
<map:pipe name="noncaching"
src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"
pool-max="${noncaching-pipeline.pool-max}">
<!-- parameter name="outputBufferSize" value="8192"/ -->
</map:pipe>
The following should also work (in map:pipelines section):
<map:pipeline>
<map:parameter name="outputBufferSize" value="8192"/>
...
</map:pipeline>
We could argue about another default value than -1 though. Something
like 1024^2.
WDYT?
Joerg