1.0

Table Of Contents
Callback Configuration Procedures
Callback conguration procedures are SQLFire-specic procedures for conguring listeners.
SYS.ADD_LISTENER
Attach an event listener (an implementation of the EventCallBack interface) to a table.
Syntax
SYS.ADD_LISTENER
(
IN ID VARCHAR(128) NOT NULL,
IN SCHEMA_NAME VARCHAR(128) NOT NULL,
IN TABLE_NAME VARCHAR(128) NOT NULL,
IN FUNCTION_STRING VARCHAR() NOT NULL,
IN INIT_INFO_STR VARCHAR(),
IN SERVER_GROUPS VARCHAR()
)
ID
A unique identier for this listener.
SCHEMA_NAME
The schema of the table to which the listener is added.
TABLE_NAME
Table name to which the listener is added.
FUNCTION_STRING
The fully-qualied class name of the EventCallback implementation.
INIT_INFO_STR
A string of initialization parameter values to pass to the init method of the listener
implementation after calling its default constructor.
SERVER_GROUPS
A comma-separated list of server groups on which SQLFire installs the listener. If this parameter
is null, SQLFire installs the listener to all data stores (SQLFire members that host data).
Example
The following code adds an example listener implementation to a table. Example Listener
Implementation on page 184 shows the listener code.
Connection conn = getConnection();
CallableStatement cs = conn
.prepareCall("CALL SYS.ADD_LISTENER(?,?,?,?,?,?)");
cs.setString(1, id);
cs.setString(2, test);
cs.setString(3, table);
cs.setString(4, testpackage.EventCallBackListenerImpl);
cs.setString(5, emp.ftable:3);
cs.setString(6, null);
cs.execute();
SYS.ATTACH_LOADER
Attach a rowloader implementation to a table.
567
SQL Language Reference