Hello Friends,
    I am getting Max Open Cursors Exceeded Exception. I am making and
closing Connections to my Oracle database from my Session Bean. The code is
given below:

func()
{
        conn = ds.getConnection();
        conn.setAutoCommit(false);
        Statement stmt;
        try
        {
            stmt = conn.createStatement();
            stmt.executeUpdate(sql);
        }
        catch (Exception sql_ex)
        {
             conn.close();
       }

        try
        {
            conn.close();
        }
        catch (Exception conn_ex)
        {
        }
}

Now as seen above I am not closing my Statement object by doing
stmt.close(). Also in some other section of my program i am obtaining a
Result Set. But at the end I am only closing the Connection and not closing
the ResultSet. Will this lead to Max Open Cursors Exceeded Exception? Is it
not that only closing the Connection Object by calling conn.close() even
closes the cursors.

    Thanking in advance.

Regards,
Prateek

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to