TransactionComponent that supports autocommit setting and methods
AutoCommitter instances accept an autocommit keyword argument
which tells them they have permission to take control of their
transaction boundaries. Any autocommitted methods of an
AutoCommitter will automatically be wrapped in a transaction if
the object has not already joined one.
In addition, if a txnSvc keyword isn't supplied, but autocommit
is a true value, AutoCommitter objects allocate their own private
transaction service instance, for use in autocommitted methods.
This transaction service will be shared with any sub-components of
the AutoCommitter , thus ensuring composability. You will normally
want your subcomponents, however, to be created with a false or missing
autocommit setting, so that they simply participate in your
component's private transaction if appropriate.
|