>transaction:
> # some code
> # that makes up the transaction
> transaction:
> # This is a sub transaction
> # Perhaps more code for the first transaction
What's wrong with:
TransactionAbort = 'TransactionAbort'
try:
# some code
# that makes up the transaction
try:
# This is a sub transaction
except TransactionAbort:
# rollback sub transaction
raise TransactionAbort # Roll back transaction as well
else:
# commit sub transaction
# Perhaps more code for the first transaction
except TransactionAbort:
# rollback transaction
else:
# commit sub transaction
Or did you envision the rollback and commit to be more "transparent"
operations?
-Jaap-
-- Jaap Vermeulen . Sequent Computer Systems, Inc Telephone: (503) 578-4404 | Management Frameworks, M/S RHE2-705 Fax : (503) 578-7569 | 15450 SW Koll Parkway Email : jaap@sequent.com | Beaverton, Oregon 97006-6063