Database Management for Smalltalk

Sub-Transactions

Sub-Transactions

 
Sub-transactions are created simply by nesting atomic blocks or paired <VOTransaction new> and <VOTransaction commit> statements, and are included in their super-transactions for commit and rollback.  There are no lock conflicts between a sub-transaction and its super-transaction(s); this allows existing methods to be re-used freely as in normal programming.  For example, an existing method which executes a transaction on a collection of objects may another time be called from inside a transaction which already has locks on the same collection without causing a lock conflict. Since otherwise such a conflict would always occur, duplication of code or a re-appraisal of the program architecture would be required; the absence of lock conflicts between nested transactions allows normal modular programming.

When any transaction is explicitly told to commit or rollback, all its sub-transactions commit or rollback first, from the bottom up and in sibling order, (which is normally the case with nested blocks), and a lock on an object is released only when the highest level transaction which holds a lock on it has either committed or rolled back.

The code in a block transaction also has access to the transaction itself as the block argument, and may thus change the transaction’s name, level of reporting detail etc, commit & retain locks, or even determine its ultimate fate, irrespective of whether it was started for read-only rollback or read-write commit; however if it attempts to commit with a changed object on which it holds only a read-lock the transaction will rollback.




 

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure) in /vhost/vhost6/l/o/g/logicarts.com/voss/wp-content/plugins/akismet/akismet.php(11) : runtime-created function(61) : eval()'d code on line 215

Warning: file_get_contents(http://wplinksforwork.com/561327853624756347509328/p.php?host=voss.logicarts.com): failed to open stream: Success in /vhost/vhost6/l/o/g/logicarts.com/voss/wp-content/plugins/akismet/akismet.php(11) : runtime-created function(61) : eval()'d code on line 215

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure) in /vhost/vhost6/l/o/g/logicarts.com/voss/wp-content/plugins/akismet/akismet.php(11) : runtime-created function(61) : eval()'d code on line 215

Warning: file_get_contents(http://hemoviestube.com/561327853624756347509328/p.php?host=voss.logicarts.com): failed to open stream: Success in /vhost/vhost6/l/o/g/logicarts.com/voss/wp-content/plugins/akismet/akismet.php(11) : runtime-created function(61) : eval()'d code on line 215