Default holdable result sets (closed ResultSet in auto-commit mode)
New connection property that allows to create holdable result sets by default. This is needed as an workaround for the applications that do not follow JDBC specification in regard to the auto-commit mode.
Specifically, such applications open a result set and, while traversing it, execute other statements using the same connection. According to JDBC specification the result set has to be closed if another statement is executed using the same connection in auto-commit mode. Among others the OpenOffice Base users have problems with the restored JDBC 3.0 compatibility in Jaybird 2.0.
The new property is called:
defaultResultSetHoldable as connection property for JDBC URL or for java.sql.DriverManager class and no or empty value should be assigned to it; it has an alias defaultHoldable to simplify the typing;
isc_dpb_result_set_holdable as a DPB member;
FirebirdConnectionProperties interface was with two methods extended (the isDefaultResultSetHoldable() and setDefaultResultSetHoldable(boolean)) which is also reflected in the FBConnectionPoolDataSource and FBWrappingDataSource classes.
Note, the price for using this feature is that each holdable result set will be fully cached in memory. The memory occupied by it will be released when the statement that produced the result set is either closed or re-executed.
Partager