[Catalyst] How safe are database transactions?

Bill Moseley moseley at hank.org
Thu Jan 4 15:20:10 GMT 2007


On Thu, Jan 04, 2007 at 10:45:49AM +0100, Xavier Robin wrote:
> Hello all,
> 
> I'm sorry if it is the wrong list, but I thought it was more a 
> Catalyst-specific issue than a DBIx::Class one, as it is about the way 
> Catalyst uses DBIx::Class.

Related to Catalyst, my "do_transaction" is in my base controller --
it tracks nested calls and it calls my model's do_transaction method
to start the actual database transaction.

I do this mainly because I have transactions that also send an email.
The actual sending of the email is delayed until the transaction
completes.  I don't want to send out a confirmation email until I know
the database transaction is complete, and that mail might get
generated inside a nested transaction.


-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list