You are correct...  i just dug out the code that was giving me problems and
found the convenience method to close PreparedStatement's and ResultSet's
to be commented out.
Don't know how that happened and obviously the thin driver for oracle works
fine.  I last used it soon after it came out and assumed it was a bug and
moved onto another driver.

To illustrate my error, the following is a stack trace of the bad code.
----------------------------------------------------------------------------
---------------
using connection 47 times
1
using connection 48 times
1
using connection 49 times
java.sql.SQLException: ORA-01000: maximum open cursors exceeded

        at oracle.jdbc.ttc7.TTIoer.processError(Compiled Code)
        at oracle.jdbc.ttc7.Oopen.receive(Compiled Code)
        at oracle.jdbc.ttc7.TTC7Protocol.open(Compiled Code)
        at oracle.jdbc.driver.OracleStatement.<init>(Compiled Code)
        at oracle.jdbc.driver.OracleConnection.createStatement(Compiled Code)
        at OracleDBTest.testConnection(Compiled Code)
        at OracleDBTest.main(Compiled Code)
using connection 50 times 
----------------------------------------------------------------------------
---------------

Thanks for correcting my error.  I usually try not to make any...<grin>

Ross

At 07:17 AM 5/29/99 +0200, you wrote:
>
>Hi,
>On Fri, 28 May 1999, Ross J.P. Ethier wrote:
>RJPE |If this is the type 4 driver supplied by Oracle, it seems to only
handle 50
>RJPE |uses per connection and then the connection blows up!
>
>We use these type 4 drivers (JDBC-thin) on a production server and we
>can use one connection for serveral 100k transactions in a connection
>pool. 
>We had problems with errors like 'too many open cursors'-errors or
>the like first (I think that is what you mean with 'connection blows up').
>But this seems to be a bug in ResultSet and Statment handling of oracle.
>If you consequently close your ResultSets and Statemets (which you should
>do anyway) after use, the type 4 drivers are quite stable.
>To make sure that we close rsets and statements we utilize the finally
>clause auf java:
>----
>ResultSet rset=null;
>Statement stmt=null;
>try {
>  stmt = new Statement();
>  rset = ..
>  // do processing here
>}
>catch () {
>}
>finally {
>  if (rset != null) rset.close();
>  if (stmt != null) stmt.close();
>}
>-----
>




------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:       [EMAIL PROTECTED]

Reply via email to