[jifty-devel] JDBI transactions

Andrew Sterling Hanenkamp andrew.hanenkamp at boomer.com
Tue Mar 13 10:13:44 EDT 2007


While looking into a way to make the V-M class instantiation work
better, I did some digging in JDBI transactions. I got to thinking about
it and was thinking that it would be nice to have a transaction system
that could do the following:

1.	Truly nested transactions: If a rollback is nested within a
commit, the code of that rollback is removed from the ultimate commit
(which is not currently the case, as far as I can tell).
2.	The ability to store code as part of a transaction that gets run
on ultimate commit or on ultimate rollback.
3.	Creating a "transaction { }" wrapper method that will execute a
coderef  and perform automatic rollback on exception or automatic commit
otherwise.
4.	Encapsulating transactions in objects that could be manipulated
in a straightforward manner---rather than as a collection of methods on
Jifty::DBI::Handle.

I looked around on CPAN to see if there was already a module for helping
with this, but the modules either require wrapping DBI (e.g.,
DBIx::Transaction) or don't really work the way I have described (e.g.,
DBIx::Roles::Transaction). All the transaction modules I see are also
tied to some specific file- or DBI-based task and don't provide tools to
help with the execute on commit/rollback feature.
 
Ideas or comments?
 
Cheers,
Andrew
 
 
--
Andrew Sterling Hanenkamp
Interaction Developer
Boomer Consulting, Inc.
 
1.785.537.2358 ext. 17
1.888.266.6375 ext. 17
1.785.537.4545 (fax)
 
610 Humboldt
Manhattan, KS 66502
 
http://www.boomer.com/about/team/andrew-hanenkamp.html
<http://www.boomer.com/about/team/andrew-hanenkamp.html> 
andrew.hanenkamp at boomer.com <http://www.boomer.com/> 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070313/af2cacfe/attachment.htm


More information about the jifty-devel mailing list