Thanks Jon,

The fact that mysql does not have transaction support by default was what 
prompted the question.  The mysql doco nominates table locking as the way 
to avoid concurrency issues, however, as stated below, the introduction 
of Torque locking calls into my code seems like bad practise.  I note 
that neither Turbine or scarab use DB.lockTable(), presumably for the 
same reason.

The only real thing that comes to mind is to synchronise my business 
methods, however if disparate classes reference the same tables, it 
starts to become difficult.

I thought about ditching mysql for something that does support 
transactions, but assumed that if Turbine/scarab use mysql, then there 
must be a simple/analogous technique for setting up transaction-like 
safety.

Tips appreciated.

J.

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 8/22/01, 2:05:42 AM, Jon Stevens <[EMAIL PROTECTED]> wrote regarding Re: 
transaction-like behaviour with mysql?:


> on 8/21/01 2:00 AM, "Jason Grant" <[EMAIL PROTECTED]> wrote:

> > I've read all the posts relating to Torque & how to perform transactions,
> > but am still unclear on how to solve concurrency & data integrity issues
> > with Torque and mysql.  My understanding is that mysql always commits
> > when each statement is complete.  I assume that use of
> > o.a.t.u.db.adapter.DB.lockTable() for this purpose is bad practice if the
> > same code is to be portable with other databases which do support
> > transactions?  Should I be adding synchronized OM methods, or perhaps
> > trying to implement row locks within peer classes?  Again, these don't
> > seem like a good portable solutions.
> >
> > I'm also puzzled because I can't see how scarab prevents database race
> > conditions, so suspect that I'm missing something obvious...

> MySQL does not support transactions unless you have the BerkeleyDB stuff
> compiled in and running and the database driver you are using properly 
makes
> the right calls to MySQL.

> thanks,

> -jon


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to