Hello.
That should be fine for read only web site. For web sites/pages where
the user will edit and save objects, I find it safer to use a single
ObjectContext pr request. With a session-shared ObjectContext, you can
get into some of the following situations:
1. A context with validation errors are kept with the session. This
can prevent the user from saving other (and even unrelated) objects.
2. A single user session can have multiple requests in parallel. This
can lead you into trouble as ObjectContexts should not be used to edit
objects from multiple threads at the same time.
My favorite is to store ObjectId in the HttpSession insted of a
DataObject and then use a request based ObjectContext. For read-only
operations, a shared ObjectContext should be safe, but that is not so
relevant for my projects.
Regards,
- Tore.
On Feb 19, 2009, at 5:55 AM, Borut Bolčina wrote:
Hi,
is using CayenneFilter in web.xml suitable for very high volume
sites (50
users/second)? I am talking the entry page of the site. We are using
the
filter now, but for a less busy part of the site. What tests do you
recommend to do to decide? What should I be careful for?
Any advice/hint appreciated.
Regards,
Borut
P.S. I am seeing a deprecated code to be used in doFilter() method
of the
WebApplicationContextFilter class.