Commit 4de057c9 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use beforeCommitHook if possible.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3566 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2f54ba04
......@@ -52,6 +52,13 @@ class ActivityBuffer(TM):
self.flushed_activity = []
for activity in activity_list: # Reset registration for each transaction
activity.registerActivityBuffer(self)
# In Zope 2.8 (ZODB 3.4), use beforeCommitHook instead of
# patching Trasaction.
transaction = get_transaction()
try:
transaction.beforeCommitHook(self.tpc_prepare, transaction)
except AttributeError:
pass
except:
LOG('ActivityBuffer', ERROR, "exception during _begin",
error=sys.exc_info())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment