On 4/23/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote: > > JSF provides us with a collection of standard UI components, and these > components are integrated with JSP via JSF tag. when the JSP is executed, > a > tree of components will be constructed on the server. I wonder how many > copies of this tree should be preserved on the server to remember the > status > of ervery clients's view. If there is only one copy, which I personally > think is impossible, how dose JSF deal with muti-threads. > > The tree of components for each request is created in request scope, so it exists per request and there are no thread safety issues to worry about here. That only becomes an issue when you reference session scope or application scope properties from your components via value binding expressions -- and then, it's a matter of ensuring that the referenced method can deal correclty with multiple threads calling it.
For the JSF component tree, though, it is analogous to having your Struts form beans in request scope -- you don't have to worry about multiple threads. Craig