[ZODB-Dev] Closing ZODB connection

Antonio Beamud Montero antonio.beamud at linkend.com
Wed Oct 29 11:25:43 EST 2003


El mié, 29-10-2003 a las 17:17, Jeremy Hylton escribió:
> On Wed, 2003-10-29 at 11:05, Antonio Beamud Montero wrote:
> > Then in a case as before I need to do something like:
> >     def get_reg_list(self):
> >         con = self.db.open()
> >         root = con.root()
> >         list = root['status'].get_register_list()
> >         con.close()
> >         return list
> > 
> > No?
> 
> No.  You need to keep the connection open as long as you are using
> objects that were loaded from that connection.  The list you are
> returning contains objects loaded from con, so you can't close it.

What? This method is called like a SOAP method within an http server.
How I can do the things rigth?
Making a newlist = copy.copy(list)?

Thanks

> Jeremy
-- 
Antonio Beamud Montero <antonio.beamud at linkend.com>




More information about the ZODB-Dev mailing list