Spring Python solves these problems with its
TransactionTemplate. This utility class makes it easy to wrap business methods with transactional functionality that solves all of the problems listed earlier. Spring Python makes it easy to wrap our existing business functions with the
TransactionTemplate using its
transferfunction, and put into a
from springpython.database.core import * from springpython.database.factory import * class Bank(object): def __init__(self, connectionFactory): self.factory = connectionFactory self.dt = DatabaseTemplate(self.factory) def transfer(self, transfer_amt, source_act, target_act): self.dt.execute(""" update ACCOUNT ...