[Zope-DB] Re: Zope database connectivity

2006-10-09 Thread Pawel Lewicki

Hi,

Maciej Wisniowski napisaƂ(a):



If one is careful, one can find a reliable solution...


Hopefully I think I did this today...

I've found that psycopg pool implementation has nice
class:

class PersistentConnectionPool(AbstractConnectionPool):
   A pool that assigns persistent connections to different threads.

   Note that this connection pool generates by itself the required keys
   using the current thread id.  This means that untill a thread put away
   a connection it will always get the same connection object by successive
   .getconn() calls. This also means that a thread can't use more than one
   single connection from the pool.
   

I used this, and finally I have DCOracle2 with connection pool, without
volatile attributes (I didn't changed implementation of stored 
procedures yet),
with ability to reconnect after things like DB restart and with REAL 
ability to

open/close connections from ZMI.


Did anyone try SQL Relay as a bridge? They say When using SQL Relay, 
the database can be bounced without having to restart Zope



Pawel Lewicki

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: Zope database connectivity

2006-10-09 Thread Maciej Wisniowski



I used this, and finally I have DCOracle2 with connection pool, without
volatile attributes (I didn't changed implementation of stored 
procedures yet),
with ability to reconnect after things like DB restart and with REAL 
ability to

open/close connections from ZMI.


Did anyone try SQL Relay as a bridge? They say When using SQL Relay, 
the database can be bounced without having to restart Zope

I tried this. It works, but possible problem
with volatile attributes persists - it is specific to
Zope Database Adapters, and SQLRelay adapter
uses '_v_' attributes too.

Issue with 'reconnect' behaviour of SQLRelay may
be that your Zope instance will appear 'hanged'
when database is not running (or something like that)
because Zope threads will be waiting for DB response.
AFAIR there is no timeout for SQLRelay (sometimes
it is good, sometimes not). Another question
is what happens with transactions integrity
in this situation.

--
Maciej Wisniowski

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db