Unfortunately, I'm not certain how we can start a transaction
before the Identity filter gets a crack at the request short of
creating another filter that creates the transaction before
starting to handle the request and rolls it back if it hasn't been
committed by the time the request ends.
I know Kevin mentioned that we shouldn't worry about HOW to
implement this yet. But the code that implements the Identity
framework executes before the @expose decorated functions (which
would be ONE place to put the transaction logic).
Like this?
from cherrypy.lib.filter import basefilter
from myproject.model import hub
class TxnFilter(basefilter.BaseFilter):
def onStartResource(self):
hub.begin()
def onEndResource(self):
hub.end()
Or would that not work?
-- Jon