Bugs item #449059, was opened at 2001-08-08 02:46
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=449059&group_id=22866

Category: JBossServer
Group: v2.2.2 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Neil Fuller (neril)
Assigned to: Nobody/Anonymous (nobody)
Summary: Minerva Statement wrapper bug? 

Initial Comment:
OS: Windows 2000
JDK version 1.3
JDBC driver MySQL

I have identified a small difference in behaviour between Minerva Statement wrapper 
and the 
JDBC 
spec as I understand it. Statement.getResultSet should return null in the event of no 
more 
resultsets. Minerva doesn't do this and any attempt to use the ResultSet throws an 
exception. I 
have attached a test that demonstrates the behaviour when using a standard connection 
obtained 
from DriverManager, and one from the Minerva pool.

The code I believe is at fault is:

public class StatementInPool implements Statement {

...

   public ResultSet getResultSet() throws SQLException {
        if(impl == null) throw new SQLException(CLOSED);
        try {
            return new ResultSetInPool(impl.getResultSet(), this);
        } catch(SQLException e) {
            setError(e);
            throw e;
        }
    }
    
...

}

It should probably read something along the lines of:

   public ResultSet getResultSet() throws SQLException {
        if(impl == null) throw new SQLException(CLOSED);
        try {
            ResultSet implRS = impl.getResultSet();
            return (implRS == null ? null : new ResultSetInPool(implRS, this));
        } catch(SQLException e) {
            setError(e);
            throw e;
        }
    }

I have not tested or even compiled this due to lack of time.

Regards,

Neil.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=449059&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to