[Zope-dev] transaction_manager attribute of transaction.interfaces.IDataManager
Jim Fulton
jim at zope.com
Tue Jun 8 09:14:17 EDT 2010
On Tue, Jun 8, 2010 at 6:23 AM, Laurence Rowe <l at lrowe.co.uk> wrote:
> On 8 June 2010 09:45, Chris Withers <chris at simplistix.co.uk> wrote:
>> Hi All,
>>
>> What is this attribute actually used for?
>>
>> I see it present on IDataManager but I notice that zope.sqlalchemy's
>> SessionDataManager doesn't have this attribute, with no apparent ill effect.
>
> transaction_manager = zope.interface.Attribute(
> """The transaction manager (TM) used by this data manager.
>
> This is a public attribute, intended for read-only use. The value
> is an instance of ITransactionManager, typically set by the data
> manager's constructor.
> """)
>
> This seems to be used only in the tests, I guess it would be useful if
> you were using multiple transaction managers in a single thread. I've
> now added it to zope.sqlalchemy's data manager.
I'm in favor of removing it from the interface.
Jim
--
Jim Fulton
More information about the Zope-Dev
mailing list