[ZODB-Dev] ZODB4 project plan
Greg Ward
gward@mems-exchange.org
Mon, 2 Dec 2002 16:35:06 -0500
On 29 November 2002, Shane Hathaway said:
> The only other code in ZODB that relies on the get_transaction() builtin
> is the ExportImport class, which is a base class of Connection. The
> dependency is shallow. So once both Connection and ExportImport use the
> getTransaction() method, and you override the getTransaction() method, I
> think transactions and threads will be fully decoupled in ZODB. You'll
> just have to change your app to use ob._p_jar.getTransaction() instead of
> get_transaction().
>
> I think we should do this for ZODB 3.2. Maybe we should even provide some
> mechanism that makes it unnecessary for you and others to subclass
> Connection.
Sounds like a wonderful idea to me! I have never liked
get_transaction() -- sure it's easy and convenient when you get started,
but 1) fiddling __builtin__ is evil, and 2) sooner or later, every
non-trivial application will outgrow the "one thread, one transaction"
model. Best off without that assumption from the start.
Greg