1.0

Table Of Contents
Widget[] inoutParam4,
ResultSet[] resultSet1,
ResultSet[] resultSet2) {
...
}
}
You would congure the procedure in SQLFire using a statement similar to:
CREATE PROCEDURE myProc (IN inParam1 VARCHAR(10),
OUT outParam2 INTEGER,
INOUT DATE inoutParam3,
INOUT WidgetType inoutParam4)
LANGUAGE JAVA
PARAMETER STYLE JAVA
READS SQL DATA
DYNAMIC RESULT SETS 2
EXTERNAL NAME 'com.acme.MyProc.myMethod'
Note: The formal parameter names are used as an example, and the actual parameter names need not
match.
Note: A user-dened type (WidgetType) implementation would have to be created elsewhere in this
example.
This same CREATE PROCEDURE statement could be used even if the Java implementation included a
ProcedureExecutionContext in the method signature, as in the following example.
package com.acme.MyProc;
import java.sql.*;
public class MyProc
{public static void myMethod(String inParam1,
Integer[] outParam2,
Date[] inoutParam3,
Widget[] inoutParam4,
ResultSet[] resultSet1,
ResultSet[] resultSet2,
ProcedureExecutionContext context) {
...
}
}
Populating OUT and INOUT Parameters
Your procedure implementation returns OUT and INOUT parameters if you set their values in the single-element
array.
For example, the following code sets an OUT and an INOUT parameter:
outParam2[0] = 42; inoutParam3[0] = new
java.sql.Date(System.currentTimeMillis());
Populating Result Sets
The SQLFire API provides different ways to construct result sets in a procedure implementation.
vFabric SQLFire User's Guide150
Developing Applications with SQLFire