[Zope-dev] what transaction does get_transaction().commit() really commit?

Jephte Clain jephte.clain@caramail.com
Mon, 18 Jun 2001 07:46:31 GMT+1


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--=_NextPart_Caramail_022672992843191_ID
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

hello,

I have a method that reads:

------------8<----------------
def do_something(self):
 from Zope import DB
 conn =3D db.open()
 conn.root()['name'] =3D '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,
jephte.clain@univ-reunion.fr

______________________________________________________
Bo=EEte aux lettres - Caramail - http://www.caramail.com


--=_NextPart_Caramail_022672992843191_ID--