-----BEGIN PGP SIGNED MESSAGE-----
Jim Fulton wrote:
> Julien Anguenot wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> I implemented a pre-commit hook on transaction supporting subscribers
>> within CPS for our indexation use case. (for ZODB-3.2.x on
>> if you're interested to take a look at it :
> I get a traceback from viewcvs when I try to view the patch.
this one ? :
>> The difference I can see with your proposal is the abort() hook facility
>> that can be a good thing especially if the subscriber code has to
>> communicate with external programs for rollback purpose.
> I suggest that if you are going to "communicate with external
> programs for rollback purpose", it would be much better to
> participate as a data manager.
in ZODB-3.2 ? Can you explain ?
> I would say that the main difference is that with the simple hook
> facility I proposed, you can just register simple callables. You
> don't have to create a class.
ok for this. My idea is to control what people are going to register. So
I'm adding constraints by providing an interface they need to implement
for their own subscribers. That's mostly the point.
> I also don't see any point in making it the responsibility of
> the hook to register itself,
Hum.. yeah it's probably useless in here... It's calling the
registerBeforeCommitHookSubscriber() method of the transaction anyway.
> or what the queue business is about.
It's specific for the indexation manager. All the objects that need to
be reindex during the transaction are stored there with properties
(idxs, security reindexation, etc...) and then this queue is flushed by
the susbcriber called by the hook added just before the commit. commit()
Thanks for your feedbacks Jim.
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Plateform : http://www.cps-project.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org