[Zope-DB] Zope database connectivity

Dieter Maurer dieter at handshake.de
Wed Sep 27 13:28:53 EDT 2006


Maciej Wisniowski wrote at 2006-9-27 17:49 +0200:
> ...
>Thanks again for explanations. Seems that I'll change my DA's
>(DCOracle2 and ZCxOracleDA) to use connection pool like psycopg
>does. After quick look at their (psycopg) solution I think it is really good
>and solves (or may solve) few other issues too - like closing
>all connections with 'Close connection' button (useless with
>_v_ implementation). Implementing reconnect of broken connection
>i.e. when database was restarted shouldn't be too difficult too.

Pool based connections can be tricky as well:

   When a DA instance is accessed several times during the
   same request, it *MUST* use the same connection.

   Otherwise, you will get the same hazardous behaviour
   as with "_v_" variables being lost, just more often
   and more reliable...

I know that the "ZPsycopgDA" which comes with "psycopg 1.x" uses
"_v_" variables. I do not know whether that of "psycopg 2.x"
uses a connection pool and uses it in the correct way.

I only know that the correct connection pool use is tricky...



-- 
Dieter


More information about the Zope-DB mailing list