On Tue, Feb 13, 2007 at 06:27:57PM -0000, Petra Chong wrote:
> In the docs I have read that it is possible for non-zodb apps to plug
> into the transaction framework. However, I am unable to find any
> specifics as to how to do this. 

Read the Source, Luke.  ;)

> What I'd like to do is this:
> 1. Have my app import transaction
> 2. When transaction.commit() is called from my app, have other things be
> notified by that.

I've done that a couple of times.  What you have to do, is write a data
manager class and register it with the current transaction (by calling
transaction.get().join(your_data_manager_instance)).  Then, when
you get to transaction.commit() or transaction.abort(), your data
manager will be notified accordingly.

See transaction.interfaces.IDataManager.

Marius Gedminas
Power corrupts, but we need electricity.

Attachment: signature.asc
Description: Digital signature

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to