Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 72094 invoked from network); 19 Feb 2009 19:12:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Feb 2009 19:12:33 -0000 Received: (qmail 5367 invoked by uid 500); 19 Feb 2009 19:12:29 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 5356 invoked by uid 500); 19 Feb 2009 19:12:29 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 5286 invoked by uid 99); 19 Feb 2009 19:12:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Feb 2009 11:12:29 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [129.241.210.179] (HELO decibel.pvv.ntnu.no) (129.241.210.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Feb 2009 19:12:21 +0000 Received: from 97.80-202-37.nextgentel.com ([80.202.37.97] helo=[10.0.1.7]) by decibel.pvv.ntnu.no with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1LaEJM-0006kA-QI for user@cayenne.apache.org; Thu, 19 Feb 2009 20:11:59 +0100 Message-Id: <419827EC-5845-4B39-BBA5-F8A5DB64EAFA@pvv.ntnu.no> From: Tore Halset To: user@cayenne.apache.org In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Design question considering WebApplicationContextFilter Date: Thu, 19 Feb 2009 20:11:36 +0100 References: X-Mailer: Apple Mail (2.930.3) X-Spam-Score: 0.2 (/) X-Spam-Report: Status=No hits=0.2 required=5.0 tests=ALL_TRUSTED,TVD_RCVD_IP version=3.2.4 X-Virus-Checked: Checked by ClamAV on apache.org Hello. That should be fine for read only web site. For web sites/pages where =20= the user will edit and save objects, I find it safer to use a single =20 ObjectContext pr request. With a session-shared ObjectContext, you can =20= get into some of the following situations: 1. A context with validation errors are kept with the session. This =20 can prevent the user from saving other (and even unrelated) objects. 2. A single user session can have multiple requests in parallel. This =20= can lead you into trouble as ObjectContexts should not be used to edit =20= objects from multiple threads at the same time. My favorite is to store ObjectId in the HttpSession insted of a =20 DataObject and then use a request based ObjectContext. For read-only =20 operations, a shared ObjectContext should be safe, but that is not so =20= relevant for my projects. Regards, - Tore. On Feb 19, 2009, at 5:55 AM, Borut Bol=C4=8Dina wrote: > Hi, > > is using CayenneFilter in web.xml suitable for very high volume =20 > sites (50 > users/second)? I am talking the entry page of the site. We are using =20= > 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 =20 > of the > WebApplicationContextFilter class.