File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Concurrent Request Processing Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Concurrent Request Processing Issue" Watch "Concurrent Request Processing Issue" New topic
Author

Concurrent Request Processing Issue

Yang Guang
Greenhorn

Joined: Dec 15, 2008
Posts: 1
My JSF application uses myfaces 1.1.1. Our users sometime ran into strange errors -- http 500 error page, javascript errors when a page was being loaded, or partially painted page. In our testing environment, I found that these strange errors can sometimes occur when two users were doing actions that caused the two pages to load/reload at the same time. The tomcat server�s debug was turned on, each time the strange error occurred, I looked through the log to analyze what was going on. What I saw in the log tells me that each time such error occurred, the threads for both users were busy, but one thread would finish normally, the other would either have NoSuchElementException as soon as it tried to process the request (this caused 500 error), or it would seem like it finished normally but actually was missing many steps (this caused partially painted window problem or javascript error on the window). Have anyone seen this kind of concurrent request processing (from two different sessions) errors? Note that most of the time concurrent requests were processed without error, only sometimes the error occurred.
Duc Vo
Ranch Hand

Joined: Nov 20, 2008
Posts: 254
Maybe a good start is to check if any of your application scope backing beans which are not thread safe.


“Everything should be as simple as it is, but not simpler.” Albert Einstein
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Originally posted by Yang Guang:
My JSF application uses myfaces 1.1.1.

That's really ancient. It's already over 3 years old. Upgrade to the latest 1.1 implementation available. Or if there is room, better upgrade to the latest 1.2.

Our users sometime ran into strange errors -- http 500 error page, javascript errors when a page was being loaded, or partially painted page. In our testing environment, I found that these strange errors can sometimes occur when two users were doing actions that caused the two pages to load/reload at the same time. The tomcat server�s debug was turned on, each time the strange error occurred, I looked through the log to analyze what was going on. What I saw in the log tells me that each time such error occurred, the threads for both users were busy, but one thread would finish normally, the other would either have NoSuchElementException as soon as it tried to process the request (this caused 500 error), or it would seem like it finished normally but actually was missing many steps (this caused partially painted window problem or javascript error on the window). Have anyone seen this kind of concurrent request processing (from two different sessions) errors? Note that most of the time concurrent requests were processed without error, only sometimes the error occurred.


Either there's a bug in MyFaces implementation used, or there's simply a bug in your code. Hard to say without knowing the details.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Concurrent Request Processing Issue