[ZODB-Dev] Closing ZODB connection

Antonio Beamud Montero antonio.beamud at linkend.com
Thu Oct 30 12:22:13 EST 2003


Ops, I don't explain me correctly...
The only is giving me problems is closing the connections. 
It seems the connections aren't closed and when it reaches the max.
number of connections the server stop working.
I have re-read the ZODB-ZEO documentation over 10 times and nothing... 
My only question is why this code works?:

 def get_pending_requests(self):
        con = self.db.open()
        root = con.root()
        lista = root['pendientes'].get_resumed_list()
        con.close()
        return lista
        
If the lista is a reference to a persistent list, why it works if I have
closed the connection?

Thanks for all ;-)

El jue, 30-10-2003 a las 18:09, Christian Robottom Reis escribió:
> On Thu, Oct 30, 2003 at 04:26:10PM +0100, Antonio Beamud Montero wrote:
> > If I close a connection, why I can use the root object? 
> 
> Why *can't* you use the root object? Because the root object is provided
> *by* the connection, and if the connection goes away, the root goes away
> with it.
> 
> I recommend you read the ZODB documentation thoroughly, it will give you
> a good insight on how it works. Then, browse through the source code --
> as Tim said in another context, we'll let you have at it free of charge.
> It answers all your questions, provided you have the required
> persistence.
> 
> Take care,
> --
> Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
-- 
Antonio Beamud Montero <antonio.beamud at linkend.com>




More information about the ZODB-Dev mailing list