Re: [Modeling-users] How the transactions are done in the saveChanges?
Status: Abandoned
Brought to you by:
sbigaret
From: Marco B. <m.b...@ic...> - 2004-08-13 07:49:44
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sebastien Bigaret wrote: ... | | BTW: if you set the env. variable 'MDL_ENABLE_DATABASE_LOGGING' then you'll get | a copy of the framework db-related actions on stderr (or anywhere else if you | modify Modeling.logging) --see the appropriate annex in the User's Guide. | Ok, I will take a look |>Also, I've noticed that the ec.fetch() is a transaction which |>terminates with an abort. Is this correct? | | | This is intentional, anyhow ;) Such a transaction should be terminated, and I | cannot see any reason why it should be COMMITed, hence it is ABORTed! But if | you think differently, please let us know! | One of the basic reason for this is in the debugging/maintenance of the system. When you need to look for the DB log, it is useful to spot the problems by mean of ABORTed transactions. If the aborted transactions are the standard, this can be a problem. | |>2) how are the db transaction executed/completed inside a Zope |>transaction? In a non-zope application, I can see each fetch() |>produces a transaction, as well as the ec.saveChanges(). Is this true |>also in Zope applications? | | | Yes it is. The zope support basically consists in providing a default | EditingContext per session, possibly also connecting this EC's | saveChanges() to the transaction machinery (i.e. to each request/response loop). | That's all, and everything else will be handled in your ZProducts' code, just | the same way you would make it in pure python. | | Hope this helps, | | -- Sébastien. Yes and no... I would prefer to be able to tell ModelingFramework when it should start/stop a transaction on the db... howevr, thanks of the answer... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBHHJxXhfyAQQVoaIRAogVAKC4xp1v+Ttxp6wmjxWotOpYPtvq6gCdHIyC ric78zFY9j+Ifbc5eoVMilE= =hFeZ -----END PGP SIGNATURE----- |