Re: [Webware-discuss] SteadyDB and cx_Oracle

2008-04-10 Thread Matthew J Harriger
I double checked, the class of the exception is cx_Oracle.DatabaseError. I 
sent an e-mail to the cx_Oracle mailing list about this, I'll let you know 
what they have to say.




Can you also double check if it's really a DatabaseError and maybe ask 
the cx_Oracle folks whether this is intended? I currently only see they 
raise InterfaceErrors which would also be a problem:
http://cx-oracle.svn.sourceforge.net/viewvc/cx-oracle/trunk/Connection.c?view=markup



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] SteadyDB and cx_Oracle

2008-04-09 Thread Christoph Zwerschke
Matthew J Harriger wrote:
 I am using just the SteadyDB module from DBUtils to provide fault-tolerant 
 connections to an Oracle database using cx_Oracle as the dbapi2 module. If 
 a client loses its network connection (network cable unplugged, out of 
 range of the wireless network, etc.), and then re-establishes the 
 connection, all Oracle connections and cursors that were open become 
 invalid. Trying to execute a statement with one of those cursors returns 
 an ORA-03114 NOT CONNECTED TO ORACLE error, which causes cx_Oracle to 
 raise an exception of class DatabaseError. However, SteadyDB only tries to 
 recover from OperationlError and InternalError exceptions(SteadyDB.py, 
 lines 238 and 338). Any chance that SteadyDB could be changed in future 
 versions to also recover from DatabaseErrors? Or perhaps there could be a 
 mechanism for advanced users to set what exception types SteadyDB tries to 
 recover from? Should I submit this as a bug?

DatabaseError is very unspecific: I think cx_Oracle should really raise 
an OperationalError instead.

I have noted this problem and will try myself next time I come across 
Oracle again.

Can you also double check if it's really a DatabaseError and maybe ask 
the cx_Oracle folks whether this is intended? I currently only see they 
raise InterfaceErrors which would also be a problem:
http://cx-oracle.svn.sourceforge.net/viewvc/cx-oracle/trunk/Connection.c?view=markup

Making the error classes configurable is also a good idea, but we need 
to find a good default set and and I'd also like to see cx_Oracle fixed 
since I think OperationlError is the only correct exception for 
connection loss (the InternalError was already a concession).

-- Christoph

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss