You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@s-und-n.de> on 2002/09/13 08:51:17 UTC
Update on Error Handling and output stream buffering
Hi Team,
I implemented yesterday the buffering of the output stream (in 2.1),
so the response can be completly reset if an error occurs.
I know that Sylvain did not like this and over night I got to
a (hopefully) better solution, which I just implemented:
The environment provides a new method getOutputStream(int bufferSize),
so the pipeline implementation can controll the behaviour.
The pipeline component has a new paramter called outputBufferSize.
If this is set to "-1" (which is the default) the output stream
is completly buffered (as implemented yesterday).
If this is set to "0", no buffering takes place and a value
greater than "0" bufferes with the given size.
By configuring this parameter in the sitemap, you can turn off
buffering if you want for single pipelines.
If the response is read completly out of the cache or if
the serializer requires to set the content length (FOP for example)
the non buffered stream is automatically choosen to
avoid double buffering.
So, you can configure (finetune) those parts of your sitemap
where you don't need this buffering.
I hope you like it...
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
RE: Update on Error Handling and output stream buffering
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Torsten Curdt wrote:
>
> You mean in the configuration for the pipeline component?
>
> <map:pipelines default="caching">
> <map:pipeline name="caching" src="org.apache.cocoon...">
> <outputBufferSize>0<outputBufferSize/>
> </map:pipeline>
> </map:pipelines>
>
Nearly, the component is Parameterizable, so it should be
<map:pipelines default="caching">
<map:pipeline name="caching" src="org.apache.cocoon...">
<paramter name="outputBufferSize" value="0"/>
</map:pipeline>
And you can override this in the pipelines section:
<map:pipeline type="caching">
<map:parameter name="outputBufferSize" value="500"/>
...
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: Update on Error Handling and output stream buffering
Posted by tc...@dff.st.
> Hi Team,
>
> I implemented yesterday the buffering of the output stream (in 2.1),
> so the response can be completly reset if an error occurs.
>
> I know that Sylvain did not like this and over night I got to
> a (hopefully) better solution, which I just implemented:
Excellent!
> The environment provides a new method getOutputStream(int bufferSize),
> so the pipeline implementation can controll the behaviour.
>
> The pipeline component has a new paramter called outputBufferSize.
> If this is set to "-1" (which is the default) the output stream
> is completly buffered (as implemented yesterday).
> If this is set to "0", no buffering takes place and a value
> greater than "0" bufferes with the given size.
>
> By configuring this parameter in the sitemap, you can turn off
> buffering if you want for single pipelines.
You mean in the configuration for the pipeline component?
<map:pipelines default="caching">
<map:pipeline name="caching" src="org.apache.cocoon...">
<outputBufferSize>0<outputBufferSize/>
</map:pipeline>
</map:pipelines>
> If the response is read completly out of the cache or if
> the serializer requires to set the content length (FOP for example)
> the non buffered stream is automatically choosen to
> avoid double buffering.
>
> So, you can configure (finetune) those parts of your sitemap
> where you don't need this buffering.
>
> I hope you like it...
I bet :)
cheers
--
Torsten
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: Update on Error Handling and output stream buffering
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Carsten Ziegeler wrote:
> Nicola Ken Barozzi wrote:
>
>>Excellent, top stuff, you even implemented all the suggestions!
>>Hey, I would even propose you as a committer ;-P
>>
>
> Thanks! So I put you on my list of people wanting to buy me a beer
> if we ever meet - oh, well, this is really a long list now...
#XXXX\\ #/---`
###XXX// - \\\-##= - \\\
##XX///-` ` -- \\##- \ \\
###XX//- = \ #/ - - \\
###XX//- # #= = = ||
###XX |##- / #X- ==||
##XX /(((#\ /(()))))))))))|/
##X| | #-/ | | ||=====\\)
##X| | #-/ | | ||------ \)
#|| | #- | | || | |
\|| | | | | || | |
|| | | | | || | |
|| | | | | ||_______/)
|| | | | | ||=====//)
|| | | | | ||
|| | | | | ||
\| | | | | |/
===| | | |====
===============
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: Update on Error Handling and output stream buffering
Posted by Steven Noels <st...@outerthought.org>.
Carsten Ziegeler wrote:
>>If only also on Jakarta things would be so nice...
>>... oh well, thank goodness we have Cocoon :-D
>>
>
> Yes, and we don't have Jon showing up from time to time ;)
watch out, you should know Jon doesn't exist IRL and is basically a bot,
scanning apache mailing lists for his own name, people posting to the
wrong list, and the keywords Maven and Scarab
hey - this should trigger some exceptions in his bot logic:
Maven - Centipede
DVSL - XSLT
Anakia - Forrest
Jakarta - XML
Scarab - anything
;-)
</Steven>
--
Steven Noels http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
stevenn@outerthought.org stevenn@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
RE: Update on Error Handling and output stream buffering
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Nicola Ken Barozzi wrote:
>
> Excellent, top stuff, you even implemented all the suggestions!
> Hey, I would even propose you as a committer ;-P
>
Thanks! So I put you on my list of people wanting to buy me a beer
if we ever meet - oh, well, this is really a long list now...
> If only also on Jakarta things would be so nice...
> ... oh well, thank goodness we have Cocoon :-D
>
Yes, and we don't have Jon showing up from time to time ;)
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: Update on Error Handling and output stream buffering
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Carsten Ziegeler wrote:
> Hi Team,
>
> I implemented yesterday the buffering of the output stream (in 2.1),
> so the response can be completly reset if an error occurs.
>
> I know that Sylvain did not like this and over night I got to
> a (hopefully) better solution, which I just implemented:
>
> The environment provides a new method getOutputStream(int bufferSize),
> so the pipeline implementation can controll the behaviour.
>
> The pipeline component has a new paramter called outputBufferSize.
> If this is set to "-1" (which is the default) the output stream
> is completly buffered (as implemented yesterday).
> If this is set to "0", no buffering takes place and a value
> greater than "0" bufferes with the given size.
>
> By configuring this parameter in the sitemap, you can turn off
> buffering if you want for single pipelines.
>
> If the response is read completly out of the cache or if
> the serializer requires to set the content length (FOP for example)
> the non buffered stream is automatically choosen to
> avoid double buffering.
>
> So, you can configure (finetune) those parts of your sitemap
> where you don't need this buffering.
>
> I hope you like it...
I love you, man :-)
Excellent, top stuff, you even implemented all the suggestions!
Hey, I would even propose you as a committer ;-P
If only also on Jakarta things would be so nice...
... oh well, thank goodness we have Cocoon :-D
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org