On Saturday, November 17, 2001, at 02:57 PM, jnilson wrote:

>
>> is there any reason why you're using buffers in the render context rather
>> than writing directly to the response output stream?
>
> I need the Http request (which hold the user object among other things) 
> and
> the output buffer. As a result I had to create a container object
> (RenderContext) to hold everything as it traversed the nodes and thus 
> build
> the resulting html.

you'll find you'll get better performance by getting rid of that buffer 
and outputting straight to the response.

>> if you're not careful then re-using classes can cause unexpected problems
>> at high concurrency.
>
> By putting all the state into the user object, output(RenderContext )
> doesn't remember from one output call to the next. If there is a potential
> conflict which is rare, I just use 'synchronized'.

the classic user gotcha is that many browsers share sessions meaning that 
concurrent access to objects stored in the user session does happen. mind 
you i suppose that your way of doing things isn't intrinsically any more 
dangerous. a naive user is just as likely to write something silly into 
the servlet calling ecs as in the overriden output(RenderContext ) 
implmentation.

- robert


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to