Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 22121 invoked from network); 28 Oct 2010 14:54:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Oct 2010 14:54:09 -0000 Received: (qmail 31706 invoked by uid 500); 28 Oct 2010 14:54:09 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 31515 invoked by uid 500); 28 Oct 2010 14:54: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 31507 invoked by uid 99); 28 Oct 2010 14:54:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Oct 2010 14:54:08 +0000 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: domain of brunorene@holos.pt designates 193.126.127.18 as permitted sender) Received: from [193.126.127.18] (HELO vm-mail.dmz.holos.pt) (193.126.127.18) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Oct 2010 14:54:03 +0000 Received: (qmail 16397 invoked from network); 28 Oct 2010 14:53:38 -0000 Received: from pcport-brd.prv.holos.pt (HELO pcportbrd) (brd@[172.17.3.40]) (envelope-sender ) by vm-mail.dmz.holos.pt (qmail-ldap-1.03) with AES128-SHA encrypted SMTP for ; 28 Oct 2010 14:53:38 -0000 From: =?iso-8859-1?Q?Bruno_Ren=E9_Santos?= To: References: <003601cb76a7$adbe0a80$093a1f80$@pt> In-Reply-To: Subject: RE: Cayenne Transactions vs MySQL Transactions Date: Thu, 28 Oct 2010 15:53:38 +0100 Message-ID: <004501cb76af$e7d5e460$b781ad20$@pt> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Act2qtPKjqqu71DqSR+wZVx9lINhwwAA73DQ Content-Language: pt Hi Michael, Thanx for the answers. About point 1, when you talk about the = 'container', what do you mean? So you're telling me the default transaction engine Cayenne = uses is from the DB, not managed by cayenne programmatically (cayenne calls = BEGIN TRANSACTION and COMMIT from the DB)? About point 2, I was asking your opinion about the degree of reliability = on comparing cayenne's optimistic locking with lockings from the DB. Or do = you mean cayenne uses this mechanism straight from the DB? I was always a little = confused about if cayenne implemented these two mechanisms (transactions and = locking) or just called the proper methods from the DB. Thanx a lot Bruno -----Mensagem original----- De: Michael Gentry [mailto:mgentry@masslight.net]=20 Enviada: quinta-feira, 28 de Outubro de 2010 15:16 Para: user@cayenne.apache.org Assunto: Re: Cayenne Transactions vs MySQL Transactions 1) Cayenne does a begin transaction and end transaction when it commits (assuming you aren't using container-managed transactions, in which Cayenne is deferring that operation to the container). Are you at least using InnoDB with MySQL? MySQL hasn't had the best track record for handling transactions/rollbacks. 2) I'd say optimistic locking is critical especially in a financial application. Maybe you wouldn't need/want it for a Facebook, but you certainly want it when integrity of the data is important. Cayenne's optimistic locking is more reliable than using a version number or time stamp column. 3) Are you really using MySQL for a financial application? MySQL likes to silently (without error) change data on you. This can lead to data loss without you ever knowing about it. mrg On Thu, Oct 28, 2010 at 9:54 AM, Bruno Ren=E9 Santos = wrote: > Hello all, > > > > First, sorry about so many doubts in so little time, but I=92m trying = to decide > how to do some things on my application concerning cayenne. So adding = to my > previous doubts, here goes some more doubts: > > > > 1. =A0 =A0 =A0 Do cayenne transactions guarantee consistency as MySQL = transactions > guarantee? > > 2. =A0 =A0 =A0 Do you think cayenne=92s optimistic locking is reliable = enough to use on > a financial web application with money movements between accounts, = where you > could have lots of people messing with the same accounts? If not, how = can use a > regular lock from the MySQL DB? With a performNonSelectingQuery? > > > > Thank you so much > > Bruno Santos > > -- > > > > 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 Parque > > 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 = intended > 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 = delivering the > email to the intended recipient, be advised that you have received = this email in > error and that any use, dissemination, forwarding, printing, or = copying of this > email is strictly prohibited. If you have received this email in error = please > notify Bruno Ren=E9 Santos by telephone on +351 210 438 686 > > > >