check out the very latest trunk and apply this patch: Index: lib/sqlalchemy/databases/oracle.py =================================================================== --- lib/sqlalchemy/databases/oracle.py (revision 2487) +++ lib/sqlalchemy/databases/oracle.py (working copy) @@ -409,6 +409,8 @@ if context is not None: context._rowcount = rowcount + def is_disconnect(self, e): + return isinstance(e, self.dbapi.DatabaseError) and "ORA-03114" in str(e) OracleDialect.logger = logging.class_logger(OracleDialect)
see if that throws sqlalchemy.exceptions.SQLError for all disconnect cases. On Apr 3, 2007, at 12:28 PM, Greg Copeland wrote: > > I've done a little bit more testing and have found some interesting > results. If a connection has previously been established and it then > fails, I get a cx_Oracle exception. If a connection has yet to be > established, I get a SQLAlchemy exception. > > These are the guys I'm seeing. If it would be helpful, I can provide > a stack trace too. Nonetheless, I assume these cases are covered by > the current, ongoing effort. > > <cx_Oracle.DatabaseError instance at 0x1917bb6c> > <sqlalchemy.exceptions.DBAPIError instance at 0x1917bb4c> > > I was catching these with a generic, catchall, Exception handler but > decided I couldn't live with that, out of fear I'd wind up in an > infinite loop. I am now using, "except (sa.exceptions.DBAPIError, > cx_Oracle.DatabaseError), e:". While I don't like having the > cx_Oracle exception in there, at least I have explicit handling with > the unknown/unexpected case broken out now. > > Greg > > P.S. Keep up the good work guys! > > On Apr 2, 5:06 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: >> our current work with auto-reconnect is checked in to the trunk, >> including exception catches around rollbacks and commits. >> >> so far it does seem to work with postgres, in a rudimental test. >> >> the oracle routine is still not checked in. >> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---