[ http://issues.apache.org/jira/browse/MYFACES-543?page=all ]

Marcus Schiesser updated MYFACES-543:
-------------------------------------

    Attachment: semaphore.patch

this faces the problem of the bug. a semaphore has been included so that only 
one thread could access the same session. if a second thread accesses the 
session, only a render response is send (this is necessary as the socket for 
the first thread is closed) - therefore the second change does not change the 
state (the simple sync.patch has this problem). also this solution is faster. 
furthermore the first thread will raise a clientabortexception in that case as 
its socket is lost - this is also filtered in this patch version. hope you will 
include it.

> Problems handling simultaneous request from the same session
> ------------------------------------------------------------
>
>          Key: MYFACES-543
>          URL: http://issues.apache.org/jira/browse/MYFACES-543
>      Project: MyFaces
>         Type: Bug
>   Components: Implementation
>     Versions: 1.0.9m9
>     Reporter: Marcus Schiesser
>  Attachments: semaphore.patch, sync.patch
>
> If someone tries to do simultaneous client requests from the same HttpSession 
> instance (i used a direct resubmit in the form tag's onsubmit handler which 
> leads to two simultaneous requests) it will lead to concurrent access 
> problems.
> During my tests, it almost any time crashed in the UIViewRoot implementation. 
> The reason is that it is not thread-safe which could be easily solved by 
> synchronising the 4 process.... methods and the queueEvent method.
> But the question is where to put the synchronisation, i also tried 
> synchronising the service method of the FacesServlet class, so that only one 
> HttpSession could run at the time (IMHO something desirable). That way the 
> simultaneous request are processed one after the other.
> But a further question arises then: How MyFaces handles the problem if two 
> identically request are processed in the lifecycle - is this appart from the 
> rendering (in my tests SocketExceptions occured as the connection has been 
> reset before) a problem? Does it affect the state?
> What are your opinions concerning this topic?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to