cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno René Santos <>
Subject RE: Cayenne Transactions vs MySQL Transactions
Date Thu, 28 Oct 2010 14:53:38 GMT
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

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


-----Mensagem original-----
De: Michael Gentry [] 
Enviada: quinta-feira, 28 de Outubro de 2010 15:16
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.


On Thu, Oct 28, 2010 at 9:54 AM, Bruno René Santos <> wrote:
> Hello all,
> First, sorry about so many doubts in so little time, but I’m 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.       Do cayenne transactions guarantee consistency as MySQL transactions
> guarantee?
> 2.       Do you think cayenne’s optimistic locking is reliable enough to use
> 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
> regular lock from the MySQL DB? With a performNonSelectingQuery?
> Thank you so much
> Bruno Santos
> --
> Bruno René Santos | Gestor de Projectos - Project Manager |
> <> |  <>
> Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício 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
> email to the intended recipient, be advised that you have received this email
> error and that any use, dissemination, forwarding, printing, or copying of
> email is strictly prohibited. If you have received this email in error please
> notify Bruno René Santos by telephone on +351 210 438 686

View raw message