Arnaud
> So I think, the Cayenne DataContext has to be related to the current thread
> and not to the user session.
>
> Do you have an idea why the DataContext is bind to the current thread and
> not to the user session ?
I did some testing on this some time ago and with the standard tomcat filter the behavior is fairly intuitive. If I use the BaseContext.bindThreadObjectContext() method, then the Cayenne filter creates and returns a DataContext for each user session. If the session goes out of scope or times-out, the it appears the DataContext does as well (because I get a new DataContext at that point). This seems like reasonable behavior for most implementations.
I suppose you could configure so that you get a new DataContext for each new request (but that may not be the most optimum design).
Joe
This archive was generated by hypermail 2.0.0 : Sat Apr 24 2010 - 17:40:31 EDT