The problem is in the Minerva wrapper. In the XAClientConnection class, the call to
create a prepared statement does not send those parameters in. This may have been
done because some older drivers do not support this feature. You may want to rebuild
the jbosspool with the change to XAClientConnection as follows:
public PreparedStatement prepareStatement(String sql, int resultSetType, int
resultSetConcurrency) throws SQLException {
return con.prepareStatement(sql, resultSetType, resultSetConcurrency);
//return prepareStatement(sql);
}
One thing you should be aware of is that Oracle does not support fully-scrollable
cursors within the database itself, therefore in order to support scrolling they
implemented everything in the driver. This means that the entire result set is loaded
into memory when the query is executed.
-----Original Message-----
From: Daniel CAUNE [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 6:29 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] HELP: Strange JDBC problem.
Hi,
I encounter a strange behaviour with JBoss while I try to move the cursor to
the last row in this ResultSet object.
PreparedStatement ps = dc.prepareStatement("SELECT * FROM Foo",
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = ps.executeQuery();
rs.last();
java.sql.SQLException: "Invalid operation on a result of type forward-only :
last" [### translated from french ###]
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.driver.BaseResultSet.last(BaseResultSet.java:90)
at org.opentools.minerva.jdbc.ResultSetInPool.last(ResultSetInPool.java:846)
Strange... I didn't use the ResultSet.TYPE_FORWARD_ONLY flag, but
ResultSet.TYPE_SCROLL_INSENSITIVE. I can also ensure a similare code
correctly runs on another J2EE server with the same JDBC driver (Oracle Thin
driver).
Does the problem come from the Minerva JDBC wrapper ? My jboss.jcml misses
some additional parameters :
<mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=OraclePool">
<attribute name="PoolName">OraclePool</attribute>
<attribute
name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
<attribute name="URL">jdbc:oracle:thin:@xxx1521:xxx</attribute>
<attribute name="JDBCUser">xxx</attribute>
<attribute name="Password">xxx</attribute>
</mbean>
Thanks,
Daniel
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user