Comment 4 for bug 279945

Revision history for this message
Gary Poster (gary) wrote : Re: [Bug 279945] Re: ZStorm tied too closely to threaded transaction managers

On Wed, 2008-11-05 at 05:37 +0000, James Henstridge wrote:
> Attached is a minor change to reduce the number of places that
> explicitly use the default transaction manager to a variable on the
> ZStorm object. Using an alternative transaction manager should be as
> simple as using an alternative transaction_manager attribute, and
> perhaps changing _local to a normal dictionary rather than a
> threading.local object.
>
> So it should definitely be possible to support this. Adding default
> arguments to ZStorm's constructor for the transaction manager and a
> factory for _local would be pretty easy. How does that sound?

That sounds good, and the patch looks good. If I had a moment, I'd
contribute a test and docs to show how this could work (in particular
the _local replacement, which might not be immediately obvious, nor
clear that it was a documented and supported approach). If you don't
intend to, let me know, and I'll try to fit it in.