[ZODB-Dev] ZODB4 project plan

Christian Reis kiko@async.com.br
Tue, 3 Dec 2002 14:29:58 -0200


On Tue, Dec 03, 2002 at 11:07:32AM -0500, Shane Hathaway wrote:
> I just checked in code to ZODB (on a branch) that enables you to change 
> the policy.  Check out shane-local-transactions-branch.  From the 
> checkin message:
> 
> The Connection class now has a method setLocalTransaction().
> (Suggestions for a better method name accepted.)  Once your app calls
> this, your app is expected to use connection.getTransaction() or
> ob._p_jar.getTransaction() instead of the get_transaction() function
> to commit or abort the transaction.  Doing this enables your
> application to have multiple writable connections open in a single
> thread, which is especially usefully in GUI applications.

It's official: Shane rocks. This is very cool. I'm playing with it now
and I'll write back if unexpected `features' show up. Magnus, give this
a spin in your application, I'm quite sure you'll find it useful.

> If you don't call setLocalTransaction(), ZODB behaves as it always
> has, with transactions bound to threads.

Do many apps (Zope?) use multiple connections? Do they share connections
between threads? I'm wondering how much impact changing the default
would be. AAR, this works perfectly for me, cool.

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL