---- David Delbecq <[EMAIL PROTECTED]> schrieb:
> Hello,
> 
> I have a quite technical question related to Renderers in JSF. When
> several components references the same Renderers, what's the expected
> behaviour?
> 
> 1) One and only one renderer is instanciated and used for the whole life
> of application, his methods being called concurrently
> 2) One and only one renderer is instanciated for each component type,
> his methods being called concurrently
> 3) For each component in tree, a renderer in instanciated called during
> lifecycle and freed when respnse is send
> 4) Behaviour is not explicited by JSF specs and application should
> consider Renderers could shared, but are not forced to be.

>From the Sun javadoc for the renderer class:
http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/api/javax/faces/render/Renderer.html
<quote>
Individual Renderer instances will be instantiated as requested during the 
rendering process, and will remain in existence for the remainder of the 
lifetime of a web application. Because each instance may be invoked from more 
than one request processing thread simultaneously, they MUST be programmed in a 
thread-safe manner.
</quote>

So it seems that (1) is what is required by the spec.


Regards,

Simon

Reply via email to