myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Byrne" <>
Subject Re: MyFaces and multithreading problem
Date Thu, 26 Oct 2006 14:21:31 GMT
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 []
>Sent: Thursday, October 26, 2006 09:24 AM
>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! >>>

View raw message