The Java EE platform specification going back to J2EE 1.2 indicates the following:
Support for the PreparedStatement method getMetaData is not
required. This method must throw an SQLException if it is not supported.
This is what the CTS JDBC tests have been validating since CTS 1.2.
The JDBC javadocs indicate the following:
getMetaData
ResultSetMetaData getMetaData()
throws SQLException
Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed.
Because a PreparedStatement object is precompiled, it is possible to know about the ResultSet object that it will return without having to execute it. Consequently, it is possible to invoke the method getMetaData on a PreparedStatement object rather than waiting to execute it and then invoking the ResultSet.getMetaData method on the ResultSet object that is returned.
NOTE: Using this method may be expensive for some drivers due to the lack of underlying DBMS support.
Returns:
the description of a ResultSet object's columns or null if the driver cannot return a ResultSetMetaData object
Throws:
SQLException - if a database access error occurs or this method is called on a closed PreparedStatement
Since:
1.2
Given that CTS validates that a SQLException is thrown and this is the test suite that just about every JDBC driver has been run against, I would like to update the javadocs to match the Java EE requirements as if we revert to the javadocs, we could result in existing drivers failing which were once passing CTS.
Add a returns javadoc param to DatabaseMetaData.getRowIdLifetime
Due to the fact that we could not make changes to the RowSets spec, we had to align the ConflictingRow interface closer with SyncResolver and RowSets.
Also changed the DataSetResolver interface removing syncRow() and renamed the sync() method to resolveConflicts()
Minor changes to the SQLDataSetSyncException signature as well
Updated the javadocs for ResultSet, PreparedStatement, CallableStatement, Connection, Statement to indicate that calling methods on a closed object will throw a SQLException
Support for the PreparedStatement method getMetaData is not
required. This method must throw an SQLException if it is not supported.
This is what the CTS JDBC tests have been validating since CTS 1.2.
The JDBC javadocs indicate the following:
getMetaData
ResultSetMetaData getMetaData()
throws SQLException
Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed.
Because a PreparedStatement object is precompiled, it is possible to know about the ResultSet object that it will return without having to execute it. Consequently, it is possible to invoke the method getMetaData on a PreparedStatement object rather than waiting to execute it and then invoking the ResultSet.getMetaData method on the ResultSet object that is returned.
NOTE: Using this method may be expensive for some drivers due to the lack of underlying DBMS support.
Returns:
the description of a ResultSet object's columns or null if the driver cannot return a ResultSetMetaData object
Throws:
SQLException - if a database access error occurs or this method is called on a closed PreparedStatement
Since:
1.2
Given that CTS validates that a SQLException is thrown and this is the test suite that just about every JDBC driver has been run against, I would like to update the javadocs to match the Java EE requirements as if we revert to the javadocs, we could result in existing drivers failing which were once passing CTS.
Add a returns javadoc param to DatabaseMetaData.getRowIdLifetime
Due to the fact that we could not make changes to the RowSets spec, we had to align the ConflictingRow interface closer with SyncResolver and RowSets.
Also changed the DataSetResolver interface removing syncRow() and renamed the sync() method to resolveConflicts()
Minor changes to the SQLDataSetSyncException signature as well
Updated the javadocs for ResultSet, PreparedStatement, CallableStatement, Connection, Statement to indicate that calling methods on a closed object will throw a SQLException