Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 24136 invoked from network); 22 Nov 2010 15:13:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Nov 2010 15:13:40 -0000 Received: (qmail 20411 invoked by uid 500); 22 Nov 2010 15:14:11 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 20361 invoked by uid 500); 22 Nov 2010 15:14:09 -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 20353 invoked by uid 99); 22 Nov 2010 15:14:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Nov 2010 15:14:08 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.214.43] (HELO mail-bw0-f43.google.com) (209.85.214.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Nov 2010 15:14:02 +0000 Received: by bwz14 with SMTP id 14so6238283bwz.16 for ; Mon, 22 Nov 2010 07:13:41 -0800 (PST) Received: by 10.204.65.204 with SMTP id k12mr5477493bki.169.1290438821097; Mon, 22 Nov 2010 07:13:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.59.145 with HTTP; Mon, 22 Nov 2010 07:13:16 -0800 (PST) In-Reply-To: <002201cb8a31$f01d8c50$d058a4f0$@pt> References: <002201cb8a31$f01d8c50$d058a4f0$@pt> From: Michael Gentry Date: Mon, 22 Nov 2010 10:13:16 -0500 Message-ID: Subject: Re: Optimistic Locking To: user@cayenne.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Bruno, When Cayenne throws an optimistic locking exception, it doesn't automatically rollback changes in your objects. The commit to the database failed. Whatever you had in memory stays the way you had it and whatever was in the database is unaltered there. mrg On Mon, Nov 22, 2010 at 5:42 AM, Bruno Ren=E9 Santos w= rote: > Hello all, > > > > I have a doubt about optimistic locking. When the lock fails (concurrent = access) > the DB transaction is rollbacked but what about the ObjectEntities? Are t= hey > rollbacked too (with context.rollbackChanges())? The situation here is th= at I > wanted to do commit retries when the lock fails but i needed to be sure t= hat the > information on the objects is not rollbacked but the information on the D= B is. > > > > Thanx > > Bruno > > > > -- > > > > Bruno Ren=E9 Santos | Gestor de Projectos - Project Manager | > brunorene@holos.pt | =A0 > http://www.holos.pt > > > > Holos - Solu=E7=F5es Avan=E7adas em Tecnologias de Informa=E7=E3o S.A. > > Parque de Ci=EAncia e Tecnologia de Almada/Set=FAbal . Edif=EDcio Madan P= arque > > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica > > Phone: +351 210 438 686 . Fax: +351 210 438 687 > > > > This email and any files transmitted with it are confidential and intende= d > solely for the use of the individual or entity to whom they are addressed= . If > you are not the intended recipient or the person responsible for deliveri= ng the > email to the intended recipient, be advised that you have received this e= mail in > error and that any use, dissemination, forwarding, printing, or copying o= f this > email is strictly prohibited. If you have received this email in error pl= ease > notify Bruno Ren=E9 Santos by telephone on +351 210 438 686 > > > >