Subject Re: [Firebird-Java] Yet about (Jaybird 2.0.1 + JDBC 3.0) x 1.5.5
Author Edilmar
Edilmar escreveu:
> Hi Roman,
>
> You had took about putting this code in every Statement creation (and
> every PreparedStatement, CallableStatement, ...) to allow multiple
> cursors using the same connection.
>
> Statement stmt = conn.createStatement(
> ResultSet.TYPE_SROLL_INSENSITIVE,
> ResultSet.CONCUR_READONLY,
> ResultSet.HOLD_CURSORS_OVER_COMMIT);
> ResultSet rs = stmt.executeQuery(....);
> while(rs.next()) {
> // do something else
> }
>
> However, looking at other JDBC drivers (for other RDBMSs), all of them
> work fine with simple "Statement stmt = conn.createStatement();".
>
> Then, my doubt is:
> 1) is this a limit of Firebird RDBMS?
> or
> 2) is this a limit of Jaybird?
> or
> 3) don't all other JDBC drivers understand rightly the JDBC 3.0 spec?
>

Looking at JDBC 3.0 specification, in page 117, section 14.1.3:

=========
The default holdability of ResultSet objects is "==>>implementation
defined<<==". The DatabaseMetaData method getResultSetHoldability can be
called to determine the default holdability of result sets returned by
the underlying data source.
=========

Then, I think the Jaybird default implementation is
CLOSE_CURSORS_AT_COMMIT, and all other JDBCs use
HOLD_CURSORS_OVER_COMMIT by default, right?