You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by ma...@daimlerchrysler.com on 2005/08/24 13:05:19 UTC
Threadsafety of JSF DataModel / TreeModel
Hi,
well I was thinking about to improve the TreeModel for the tree2 but came
to a more general problem regarding threadsafety.
When a component uses a local Model there are no problems at all,
everything runs in one thread per request. Now if you move your model to
any higher scope than request as far as I can see there are potentially
problems with threadsafety ... in a multi-threaded servlet environment.
Two views with different components using the same model could interfere
each other. Ok, the user could provide a special model but with the
concept of setting a row and than retrieving data about that row its
somehow impossible to do a synchronization in the model that every
component gets the right data for its row currently processing.
Is this a flaw in the spec or do I miss something here?
Regards,
Mathias Werlitz