Re: [sqlalchemy] Re: joining sessions / two phase commit

2010-02-14 Thread Chris Withers
Wichert Akkerman wrote: On 2010-2-9 09:48, Chris Withers wrote: I know that zope's transaction package aims to do just this, I wonder if anyone's used that, or anything else, with SA to solve this problem? You mean ZODB's transaction package? it's actually now just a standalone package ;-)

Re: [sqlalchemy] Re: joining sessions / two phase commit

2010-02-14 Thread Antoine Pitrou
Le dimanche 14 février 2010 à 17:47 +, Chris Withers a écrit : Wichert Akkerman wrote: On 2010-2-9 09:48, Chris Withers wrote: I know that zope's transaction package aims to do just this, I wonder if anyone's used that, or anything else, with SA to solve this problem? You mean

Re: [sqlalchemy] Re: joining sessions / two phase commit

2010-02-14 Thread Wichert Akkerman
On 2/14/10 19:02 , Antoine Pitrou wrote: Le dimanche 14 février 2010 à 17:47 +, Chris Withers a écrit : Wichert Akkerman wrote: On 2010-2-9 09:48, Chris Withers wrote: I know that zope's transaction package aims to do just this, I wonder if anyone's used that, or anything else, with SA to

Re: [sqlalchemy] Re: joining sessions / two phase commit

2010-02-14 Thread Antoine Pitrou
Le dimanche 14 février 2010 à 19:45 +0100, Wichert Akkerman a écrit : That is by design: zope.sqlalchemy (which is really the thing you are complaining about) forces you to commit the entire transaction. This is required to coordinate transactions between multiple participants in a

Re: [sqlalchemy] Re: joining sessions / two phase commit

2010-02-14 Thread Wichert Akkerman
On 2/14/10 19:54 , Antoine Pitrou wrote: Le dimanche 14 février 2010 à 19:45 +0100, Wichert Akkerman a écrit : That is by design: zope.sqlalchemy (which is really the thing you are complaining about) forces you to commit the entire transaction. This is required to coordinate transactions

Re: [sqlalchemy] Re: joining sessions / two phase commit

2010-02-14 Thread Antoine Pitrou
Le dimanche 14 février 2010 à 19:58 +0100, Wichert Akkerman a écrit : On 2/14/10 19:54 , Antoine Pitrou wrote: Le dimanche 14 février 2010 à 19:45 +0100, Wichert Akkerman a écrit : That is by design: zope.sqlalchemy (which is really the thing you are complaining about) forces you to

Re: [sqlalchemy] Re: joining sessions / two phase commit

2010-02-14 Thread Chris Withers
Antoine Pitrou wrote: Oh, sorry. That doesn't really change my point, though, since we are talking about use of transaction in an SQLAlchemy context. Which doesn't imply using zope.sqlalchemy... Chris -- Simplistix - Content Management, Batch Processing Python Consulting -

Re: [sqlalchemy] Re: joining sessions / two phase commit

2010-02-09 Thread Chris Withers
Ants Aasma wrote: On Feb 4, 12:41 am, Chris Withers ch...@simplistix.co.uk wrote: The problem is that session2 (and it's engine) are only created in a small part of the code, while session1 is created in a much wider encompassing framework. As such, there's no obvious way to get session1 to the

Re: [sqlalchemy] Re: joining sessions / two phase commit

2010-02-09 Thread Wichert Akkerman
On 2010-2-9 09:48, Chris Withers wrote: I know that zope's transaction package aims to do just this, I wonder if anyone's used that, or anything else, with SA to solve this problem? You mean ZODB's transaction package? :). I use that all the time to get transactions working across multiple

[sqlalchemy] Re: joining sessions / two phase commit

2010-02-09 Thread Ants Aasma
On Feb 9, 10:48 am, Chris Withers ch...@simplistix.co.uk wrote: Okay, but what does the transaction manager do that's different from calling commit on session1 and session2 in order? A TM should write to durable storage when a transaction group is prepared before committing any transaction.

[sqlalchemy] Re: joining sessions / two phase commit

2010-02-08 Thread Ants Aasma
On Feb 4, 12:41 am, Chris Withers ch...@simplistix.co.uk wrote: The problem is that session2 (and it's engine) are only created in a small part of the code, while session1 is created in a much wider encompassing framework. As such, there's no obvious way to get session1 to the piece of code