On Sep 7, 2006, at 4:40 PM, Jay Buffington wrote:
This solves a problem I was having some time ago while implementing
ecommerce (verisign):
1. insert customer's info
2. authorize credit card
3. log authorization response to database
4. if auth fails roll back #1, but keep #3
Nested transactions for problems like that require DB supported
nested transactions-- oracle and postgres have them ( i think ).
DBIx is just transaction aware- it lets you nest your transactions by
hijacking begin/commit|rollback. Errors on an inner transaction
create errors for the whole nested structure.
IE: You can't rollback to 1 from 3- you need to do that in the database.
It's useful for situations where you're wrapping a bunch of modules
or 'pages' into a larger chain of commands.
I usually avoid your problem by using different db handles per-child
-- one of which does not support transactions , is dedicated for all
logging issues, and only has write on a few tables.