[Zope] Problems with temporary connections

Etienne Labuschagne elabuschagne at gmail.com
Fri Jul 8 10:51:49 EDT 2005


I need to make a temporary connection to the ZODB.  I have really good
reasons relating to performance and not wanting have objects in the
current cache getting removed from the cache on why I don't want to
make use of the connections in the pool.  I can elaborate on this if
really nescessary...

The supposed way to get a temporary connection would be:

conn = Globals.DB.open(temporary=1)

which works fine.  The problem is that one cannot:
conn.close()

as this puts the connector back into the pool, where it shouldn't go
and if you do it, causes all kinds of nasty lockups, etc.

I have read some old posts that advise against using temporary
connectors as this can lead to memory leaks (as I can attest to after
trying to use them) and that temporary connections seem to be
"broken".

How can I get a connector, that will not be used by other normal
processes, that I can release cleanly when I am finished with it?  Or
at least ensure that one of the connectors in the pool is reserved for
a specific process and that that connector will only be used by that
process.  Can I do this by giving a "version" to the connector?

Any suggestions?

Etienne


More information about the Zope mailing list