[ZODB-Dev] Re: [Zope-Checkins] CVS: ZODB/src/ZODB -
ZApplication.py:1.14
Shane Hathaway
shane at zope.com
Fri Apr 16 11:07:01 EDT 2004
Jeremy Hylton wrote:
> Update of /cvs-repository/ZODB/src/ZODB
> In directory cvs.zope.org:/tmp/cvs-serv28715
>
> Modified Files:
> ZApplication.py
> Log Message:
> Use transaction.get() instead of getTransaction().
...
> @@ -31,7 +32,7 @@
> root=conn.root()
> if not root.has_key(name):
> root[name]=klass()
> - conn.getTransaction().commit()
> + transaction.commit()
> conn.close()
> self._klass=klass
I'm quite surprised by this change. Since the name "transaction" refers
to a module, something is required to guess that transaction.commit()
should commit "conn". One way to make that guess is to bind
transactions to threads, but why guess? With
conn.getTransaction().commit(), at least there was no need to guess.
Shane
More information about the ZODB-Dev
mailing list