In what respect are the _v_* attribs gonna cause problems. My guestimate
was that they disappeared upon transaction commit/abort. I'm also not sure
as to why I would need subtrans since I'm only messing with properties of
the object. To my knowledge, subtrans are only necessary to conserve
resources. Anyway, what you gave me works! Thanks. It seems I need to
override the _vote method (since it is only called once and allows
exceptions). As to the other stuff, I'm sure you can enlighten me further
as to why. I appreciate the help.
From: John D. Heintz [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 05, 2001 12:45 PM
To: Tim McLaughlin
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Zope-dev] is there a hook for before the transaction is
I have two suggestions, I hope one of them helps.
1) Attached is a TM.py file that I wrote based on the one you mention
below. I've tried to make it more obvious and better documented.
2) Don't use this kind of functionality, but rather use sub-transaction
The first suggestion has more overhead than what I assume you would
need, but the second one won't work for all situations.
A Fishbowl proposal of mine, HashingSupport, was going to use the same
kind of hook you are asking about. In this case though, using
sub-transaction commits made a lot more sense.
In general though, I think that _v_* attributes pose a non-trivial
problem that probably requires a hook on abort() if not commit() as well.
Tim McLaughlin wrote:
> Is there a hook for before the transaction is committed for objects which
> subclass Persistent? I found __inform_commit__ for a "registered" object,
> but I can't seem to get that to work as I thought it did. I also tried
> subclassing TM like a DA, but to no avail.
> Tim McLaughlin BCSwebservices.net
> Director, Technical Group 1950 Old Gallows Road
> tel: (703) 790.8081 x111 Suite 201
> [EMAIL PROTECTED] Vienna, VA 22182
> www .bcswebservices. net
> Zope-Dev maillist - [EMAIL PROTECTED]
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope )
. . . . . . . . . . . . . . . . . . . . . . . .
John D. Heintz | Senior Engineer
1016 La Posada Dr. | Suite 240 | Austin TX 78752
T 512.633.1198 | [EMAIL PROTECTED]
w w w . d a t a c h a n n e l . c o m
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -