E&S CVS Commit: PEAK - Virtual re-write of the transaction API. Dropped ZODB shim and savepoint

pje at eby-sarna.com pje at eby-sarna.com
Fri Sep 13 18:28:00 EDT 2002


Module Name:	PEAK
Committed By:	pje
Date:		Fri Sep 13 22:27:22 UTC 2002

Modified Files:
	PEAK/src/peak/storage: interfaces.py transactions.py

Log Message:
Virtual re-write of the transaction API.  Dropped ZODB shim and savepoint
support as YAGNIs.  Added a 'committed' flag to the 'finishTransaction()'
message, and dropped the 'beginTransaction()' message, because you can
now only join a transaction *after* it has begun.  Added a 'fail()' method
which forces a transaction to be aborted - or to be precise, disallows it
from ever committing.  This is there mainly for internal use, and by the
new error handler facility: transactions notify an
'ITransactionErrorHandler' instance whenever a transaction participant
raises an exception in a "tricky" context, such as during a commit or abort
operation.  The error handler can cause the transaction to fail, remove the
participant, log or re-raise the exception, or any combination of the
above.  This takes the "policy" out of the main transaction object as well
as dodging the issues of what sort of logging or logging API should be
used.  All in all, I think this puppy's ready for some unit tests to
be written.  Yay!


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/storage/interfaces.py.diff?r1=1.5&r2=1.6
http://cvs.eby-sarna.com/PEAK/src/peak/storage/transactions.py.diff?r1=1.5&r2=1.6

To generate a diff of this commit:
cvs rdiff -r1.5 -r1.6 PEAK/src/peak/storage/interfaces.py \
    PEAK/src/peak/storage/transactions.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




More information about the source-changes mailing list