cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Hunsberger" <peter.hunsber...@gmail.com>
Subject Re: Avoiding OutOfMemory Errors by limiting data in pipeline
Date Fri, 09 May 2008 13:41:24 GMT
On Fri, May 9, 2008 at 12:08 AM, Joerg Heinicke <joerg.heinicke@gmx.de> wrote:
> On 08.05.2008 11:53, Bruce Atherton wrote:

<snip/>

> I think this is rather hard to do. The place where we instantiate the
> BufferedOutputStreams (both java.io and o.a.c.util) is
> AbstractEnvironment.getOutputStream(int bufferSize). So in order to pass a
> second buffer size argument to the BufferedOutputStream constructor we need
> to have it available there. One option would be to add it to
> getOutputStream() - which is an interface change and not really nice.

I haven't looked at the code here, but couldn't you just introduce a
second getOutputStream( int bufferSize ) method where the current
interface method continues with the current default logic if it is
used?

>
> The second option would be to pass it to the Environment instance. Since
> environments can be wrapped it needs again an interface change (but just
> adding a method, which is much better). And you have to look where
> environments are instantiated, e.g. HttpServletEnvironment in CocoonServlet.
> From what I see from a quick look only potential way to provide a
> configuration would be as servlet init parameter. That makes it two
> different places to configure these two different buffer sizes - not very
> intuitive.

Yuck.

-- 
Peter Hunsberger

Mime
View raw message