Deprecation problem and ConnectionStateError, was: Re: [ZODB-Dev] Span transaction over several threads

Diez Roggisch d.roggisch at ehotel.de
Thu Sep 9 09:58:22 EDT 2004


Hi,

> You mean unlike the copious docs for setLocalTransaction <wink>?

Yup, a good read on long and lonely winter nights.

> > what would I have to pass to DB.open() to have the same thread-spanning
> > transactional behaviour?
>
> See NEWS.txt, under the "ZODB3 3.3 alpha 3" section.  In short, you create
> an instance of transaction.TransactionManager and pass it to open().  Hmm!
> The example there is wrong:  TransactionManager doesn't have a commit()
<snip>

I'll look into that, thanks so far.

> > Another side-effect of setLocalTransaction() is that when I try to open a
> > not-yet existing DB,  I get
> >
> > ConnectionStateError: Cannot close a connection joined to a transaction
>
> Sorry, I don't know what this means.  Post code if you care!  Here's my
> best
>> Since you didn't show any code, your demands on the reader's telepathy have
> gone beyond even wishful thinking now <wink>.

I don't want to stress your PSI-capabilities too much  - I guess you'll need 
them for the upcoming lottery night. So I attached some example code, that 
illustrates my problem.

> Same Python, but I was using current ZODB trunk.  I didn't change anything
> having to do with setLocalTransaction() since 3.3b2, though.

If you recommend it, I'll go for the current trunk - but only if you convince 
me that it either solves my problem or at least some of the more serious ones 
of the world, like global warming.

Regards,

Diez
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbtest.py
Type: application/x-python
Size: 753 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20040909/78d2450e/dbtest.bin


More information about the ZODB-Dev mailing list