On Wed, Dec 28, 2011 at 4:25 PM, Michael Merickel <[email protected]>wrote:

> On Wed, Dec 28, 2011 at 4:19 PM, Mike Orr <[email protected]> wrote:
>
>> On Wed, Dec 28, 2011 at 2:10 PM, Michael Merickel <[email protected]>
>> wrote:
>> >
>> > DBSession
>> > = scoped_session(sessionmaker(extension=ZopeTransactionExtension(),
>> > twophase=True))
>>
>> Is there any downside to setting twophase=True by default? Would it
>> make life more complex for simple applications?
>>
>> Also, again, I need to know whether it's safe to share a _zte instance
>> between two sessionmakers. Because if it's not, the docs will have to
>> warn people to use it only with the default session.
>>
>
> I do not understand why you would try to share a ZTE instance between
> sessionmakers? Regardless I've looked at the ZTE code and it looks like it
> would be fine *if* an instance of SessionExtension which it subclasses can
> be shared, but I feel like the answer is "no".
>

After reading the SQLAlchemy docs, it says "The same SessionExtension
instance can be used with any number of sessions." So the answer is "yes"
you can share the same ZTE instance between sessionmakers.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to