hello,

I have a method that reads:

------------8<----------------
def do_something(self):
 from Zope import DB
 conn = db.open()
 conn.root()['name'] = 'value'
 get_transaction().commit()
 conn.close()
------------8<----------------

the method can be called from everywhere, and that's the
reason why I have to open a connection, in case one is not
available.

the question is: what transaction is commited with
get_transaction().commit() ? It is only the one associated
with the connection, or also the transaction in which is the
caller?
I mean, if my method is called from within Zope, is the
transaction of the caller commited?

thanks for any response
regards,
[EMAIL PROTECTED]

______________________________________________________
Bote aux lettres - Caramail - http://www.caramail.com

Reply via email to