Class CallStatementResultSet

  • All Implemented Interfaces:
    ResultSet

    class CallStatementResultSet
    extends NoRowsResultSetImpl
    Call a Java procedure. This calls a generated method in the activation which sets up the parameters and then calls the Java method that the procedure resolved to.

    Valid dynamic results returned by the procedure will be closed as inaccessible when this is closed (e.g. a CALL within a trigger).
    Any code that requires the dynamic results to be accessible (such as the JDBC Statement object executing the CALL) must obtain the dynamic results from Activation.getDynamicResults() and remove each ResultSet it will be handling by clearing the reference in the object returned.

    See Also:
    Activation.getDynamicResults()
    • Method Detail

      • close

        public void close()
                   throws StandardException
        Need to explicitly close any dynamic result sets.
        If the dynamic results are not accessible then they need to be destroyed (ie. closed) according the the SQL Standard.
        An execution of a CALL statement through JDBC makes the dynamic results accessible, in this case the closing of the dynamic result sets is handled by the JDBC statement object (EmbedStatement) that executed the CALL. We cannot unify the closing of dynamic result sets to this close, as in accessible case it is called during the Statement.execute call, thus it would close the dynamic results before the application has a change to use them.
        With an execution of a CALL statement as a trigger's action statement the dynamic result sets are not accessible. In this case this close method is called after the execution of the trigger's action statement.

        Section 4.27.5 of the TECHNICAL CORRIGENDUM 1 to the SQL 2003 Standard details what happens to dynamic result sets in detail, the SQL 2003 foundation document is missing these details.
        Throws:
        StandardException - Thrown on error.