There is no multi-threading in the MyFaces implementation.  You have two 
threads accessing the same data because the data is in session scope.

You might want to hit Google and read up on "single thread per request Servlet 
spec" .

Dennis Byrne

>-----Original Message-----
>From: Irek Matysiewicz [mailto:[EMAIL PROTECTED]
>Sent: Thursday, October 26, 2006 09:24 AM
>To: users@myfaces.apache.org
>Subject: MyFaces and multithreading problem
>
>We have a managed bean with session scope. It's used in one .jsp file. Usually 
>only one thread uses this bean, and everything works ok. But today we 
>discovered, that two threads access the same getter method of the bean at the 
>same time, and this leads to serious problems. Both getter invocations come 
>from MyFaces. Of course the simplest method is to use 'synchronized' attribute 
>with all methods visible to MyFaces, but this may slow down our application.
>
>Why does MyFaces use two threads here? Is there a better method than 
>synchronized? Maybe some setting in a configuration file?
>
>
>----------------------------------------------------------------------
>Jestes kierowca? To poczytaj! >>> http://link.interia.pl/f199e
>
>


Reply via email to