[Zope] _finish and _abort not called in a TM subclass
Marco Bizzarri
m.bizzarri at icube.it
Fri Jan 7 22:40:32 EST 2005
Hi all.
I'm trying to figure out the proper way to use the Shared.DC.ZRDB.TM.TM
mixin class. According to the documentation, I should derive from that
class, redefine my _abort and _finish methods, and then call the
_register method whenever it is needed.
I've created the following sample product, named CacheProduct. It has
two methods which can be called from the web, registerFromWeb and
resetMe. The first calls the _register, the second puts the
self._registered variable to 0.
I've also added some prints, in order to check the results.
If all goes well, I should see something like:
before: 0
after: 1
_finish
However, if I use ab to do a check, like
ab -c 10 -n 1000 http://server:8080/CacheProduct/registerFromWeb
I can see:
_before: 1
_after: 1
which should never happen. Also, I don't see the required calls to
_finish. After some request, the _finish reappers, only to disappear again.
Has anyone any suggestion on this topic?
Regards
Marco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CacheProduct.tgz
Type: application/x-gtar
Size: 1733 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050108/6f16fbb2/CacheProduct.gtar
More information about the Zope
mailing list