[Zope3-dev] ZopePublication performs auth outside transaction
Jeremy Hylton
jeremy@zope.com
25 Apr 2003 16:02:38 -0400
On Fri, 2003-04-25 at 15:19, Phillip J. Eby wrote:
> There shouldn't BE a "current transaction manager". That's my point. If
> there is no such thing as a "current" TM, then there is no need to suspend
> transactions, only to have multiple TM's.
> One alternative is to do away with 'get_transaction()' altogether, and
> simply require ZODB4 apps to create a transaction manager, and explicitly
> supply it to the ZODB objects that need it. That's not really going to add
> much code footprint for the simple cases, but it *will* make it abundantly
> clear how to do anything "advanced" with transactions.
To the contrary, it seems like this adds needless complexity to simple
applications. I don't want to add features for advanced applications
that come at the cost of extra complexity for simple applications.
Put another way, removing get_transaction() does not make clear to me
how to do anything advanced with transactions. I understand how to use
suspend() and resume(), even in the context of explicit interactions
with a transaction manager. A TM has a get_transaction() method that
returns the current transaction. The TM provides coordination for
independent entites to participate in a single transaction.
suspend() allows one participant to stop the current activity and start
a new one, then later restart the previous activity. That seems a
useful feature.
Perhaps it would be help if you could offer some simple, concrete use
cases.
Jeremy