The holdable result set feature permits an application to keep result sets open after implicit or explicit commits. By default, the cursor controlled by the result set is held open after a commit.
When you create a statement, you can specify that the result set will be automatically closed when a commit occurs. Result sets are automatically closed when a transaction aborts, whether or not they have been specified to be held open.
To specify whether a result set should be held open after a commit takes place, supply one of the following ResultSet parameters to the Connection method createStatement, prepareStatement, or prepareCall:
Result sets are closed when an implicit or explicit commit is performed.
Result sets are held open when a commit is performed, implicitly or explicitly. This is the default behavior.
The method Statement.getResultSetHoldability() indicates whether a result set generated by the Statement object stays open or closes, upon commit. See the Derby Reference Manual for more information.
When an implicit or explicit commit occurs, result sets that hold cursors open behave as follows: