[Zope3-Users] Still trying to connect to ZODB from external

Florian Lindner mailinglists at xgm.de
Thu May 24 09:58:49 EDT 2007


Am Mittwoch, 9. Mai 2007 18:18 schrieb Stefan H. Holek:
> You *must* either commit or abort your transaction.

Hello,
I've changed my code to:

def releaseRefreshEvent():
    """ Calls all utlities that have a INewsfeed interface registered. """
    print "releaseRefreshEvent!!"
    db = getUtility(ZODB.interfaces.IDatabase)
    conn = db.open()
    root = conn.root().data['Application']
    
    [...]
        
    get_transaction().commit()
    conn.close()
    # db.close()


but that gives another error:

WARNING ZODB.DB DB.open() has 9 open connections with a pool_size of 7

Regards,

Florian


>
> Stefan
>
> On 8. Mai 2007, at 23:02, Florian Lindner wrote:
> >   File "/home/florian/Zope3/src/ZODB/Connection.py", line 268, in
> > close
> >     raise ConnectionStateError("Cannot close a connection joined to "
> > ZODB.POSException.ConnectionStateError: Cannot close a connection
> > joined to a
> > transaction
> >
> > What is the right way to do it?
>
> --
> Anything that happens, happens.  --Douglas Adams


More information about the Zope3-users mailing list