Sylvain Wallez wrote:
> Carsten Ziegeler wrote:
> 
>> Might be worth investigating into running modes. Hmm.
>>
>> But comming back to the original problem ;) - We already have an
>> intermediate
>> output stream implemented and noone really complained about it:
>> Its the buffered output stream in the abstract text serializer...the only
>> problem here is that a) the size of the buffer might be too small
>> and b) the stream is flushed on recycle().
>>
>> So, if we
>> a) Move this buffered output stream handling out of the serializer
>>   into the environment and
>> b) Don't flush the stream on recycling a serializer and
>> c) Add a small logic checking the buffer size for the current response,
>>
>> we have everything we need.
>>
> 
> The output stream provided by the servlet engine is already buffered and 
> we can control the buffer size using ServletResponse.setBufferSize(). 
> Why do we need an additional buffer ?

Because Cocoon is not a servlet; it's mainly used as a servlet, but it 
is *not* a servlet.
So regardless to what the servlet container gives us, we must ensure 
Cocoon gets a neutral set of objects to work on.

> What about exposing this method by adding it to our Request interface ? 
> I already proposed this a while ago (see
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=101661438030015&w=2), 

As I said, we need to expose a facade of the real stream, that is 
indipendent from the environment implementation used.

Thus we should wrap any stream that is given to Cocoon in a CocoonStream 
facade, that we can control as you say, and in the servlet case delegate 
to the servlet container.

> including the proposal for setting the buffer size either as a servlet 
> parameter or an attribute of <map:pipeline>.

Definately not in the servlet conf, as a pipeline hint maybe, as a 
global parameter, surely.

-- 
Nicola Ken Barozzi                   [EMAIL PROTECTED]
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to