Are JSF 2.x ViewScoped Beans Thread Safe?
Posted
by
Mark
on Stack Overflow
See other posts from Stack Overflow
or by Mark
Published on 2011-09-14T02:44:45Z
Indexed on
2011/11/17
9:50 UTC
Read the original article
Hit count: 366
I've been googling for a couple hours on this issue to no eval.
WELD docs and the CDI spec are pretty clear regarding thread safety of the scopes provided.
For example:
Application Scope - not safe
Session Scope - not safe
Request Scope - safe, always bound to a single thread
Conversation Scope - safe (due to the WELD proxy serializing access from multiple request threads)
I can't find anything on the View Scope defined by JSF 2.x.
It is in roughly the same bucket as the Conversation Scope in that it is very possible for multiple requests to hit the scope concurrently despite it being bound to a single view / user. What I don't know is if the JSF implementation serializes access to the bean from multiple requests.
Anyone have knowledge of the spec or of the Morraja/MyFaces implementations that could clear this up?
© Stack Overflow or respective owner