1.1

Table Of Contents
If an error occurs after rows have been returned to the client, then SQLFire throws an exception and does not
attempt to retry the procedure.
Default Result Processor
If you omit the WITH RESULT PROCESSOR clause when you invoke a data-aware procedure, SQLFire uses
a default result processor implementation.
The default result processor for data-aware procedures performs unordered merges on the dynamic result sets
from each member that executes the procedure code. The default processor presents the same number of ResultSets
to the JDBC client that were declared in the CREATE PROCEDURE statement.
The default processor handles OUT and INOUT parameters as follows:
If the type is a basic SQL type, the default processor returns only the rst value returned by the procedure.
If the type is a JAVA_OBJECT type, the values from all the servers that run the procedure are concatenated
together as an object array and provided to the client as the object value. The ordering of the array elements is
signicant because a given array position corresponds to the same SQLFire member for each of the parameters.
For example, the rst element of each array corresponds to the OUT parameters that were provided by the
same SQLFire member.
Example JDBC Client
This example shows how a JDBC client can call a data-aware procedure and use a CallableStatement to work
with the procedure's result sets.
package com.vmware.sqlfire.jdbc;
import java.io.Serializable;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import com.vmware.sqlfire.procedure.ProcedureExecutionContext;
public class MyClient {
public static class ExampleObj implements Serializable {
private static final long serialVersionUID = 1L;
private int val;
public void setValue(int val) {
this.
val = val;
}
public int getValue() {
return this.val;
}
}
public static void main(String[] args) {
try {
Connection cxn = DriverManager.getConnection("jdbc:sqlfire:");
Statement stmt = cxn.createStatement();
stmt.execute("create type ExampleObjType external name '"
vFabric SQLFire User's Guide156
Developing Applications with SQLFire