Hi,
I'm using straight kinterbasdb  connections to firebird in a
multithreaded SocketServer, and actually I open a new connection at
every request. Searching for a connection pooling solution I found that
pool.py sqlalchemy can be great for my needs.

I whish modify my application so it can reuse a pool o firebird
connections, but must be possible also connect automatically to a
second failower database if the main db is unreachable.

Passing a function to a custom pool such as:

def getconn():
   try:
       conn = kinterbasdb.connect( dsn=dns1, ...)
   except kinterbasdb.OperationalError:
       conn = kinterbasdb.connect( dsn=dns2, ...)
   return conn

I can switch to a secondary database if the main db is not working, but
this works only for new connections, existing connections in the pool
will not be automatically restored.

I'm missing something? Can this be accomplished with sqlalchemy?
DBUtils from webware can catch errors on calls to dbmodule.cursor() and
try to reconnect but lacks the custom pool construction of sqlalchemy

Ezio


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to