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
Enviada: quinta-feira, 28 de Outubro de 2010 15:16
Para:
[email protected]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é 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 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é Santos | Gestor de Projectos - Project Manager |
[email protected] | <
http://www.holos.pt>
http://www.holos.ptHolos - 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 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é Santos by telephone on +351 210 438 686