Re: [cx-oracle-users] How to transparently re-connect using cx_Oracle?
Brought to you by:
atuining
From: Laurelin of M. E. <la...@fn...> - 2006-10-04 13:54:07
|
Unfortunately, this won't work for the case I'm trying to solve because the connection that is given to me is (and must remain) a cx_Oracle.Connection. No matter how I wrap it and mungle it at my end, the connection that the caller has passed me *is* the connection. If I change it or reconnect, then essentially I am using a *new*, separate connection, and the caller still has its dead connection. Unless the cx_Oracle.Connection instance knows how to reconnect itself.... Thanks, lauri Thus spaketh Amaury Forgeot d'Arc on 10/04/2006 03:22 AM: > [snippage] > > A solution could be to wrap both classes (connection and cursor) > inside "RetryingConnection", "RetryingCursor" classes. They delegate > all calls to their base objects, but the RetryingConnection.cursor() > function returns a wrapped RetryingCursor. ... |