It works fine in that the queryBean is passed the formBean when access in jsf/jsp page. Within the query class, I access the formBean, but I guess since formBean is in the session scope its possible the user could submit another request and write to the bean while I am reading it. I can synchronize the session, but that seems to defeat the purpose of the managed bean since it defines the scope, and if it changed I would have to update the code as well.
Is there some way to determine the scope of the managed bean through some api, or, perhaps there is a way to synchronize client requests per session with a filter? Is there some standard way of doing that? Thanks
Joined: May 02, 2007
I was thinking of adding a servlet filter with code something like this.
Each request from the same session would be forced to wait ... i think
My app is running in a single JVM. I'm assuming the overhead is setting up and taking down the synchronization, and that it doesn't matter (at least in this case) that I'm in that block for the entire request?