Use this system procedure to register or unregister a Java method as the script for a connection event.
Item |
Description |
Remarks |
---|---|---|
1 |
version name |
VARCHAR(128) |
2 |
event name |
VARCHAR(128) |
3 |
script contents |
For SQL Anywhere and Microsoft SQL Server, this parameter is TEXT. For Adaptive Server Enterprise, this parameter is VARCHAR(16384). For Adaptive Server Enterprise prior to 12.5, this parameter is VARCHAR(255). For DB2 UDB, this parameter is VARCHAR(4000). For Oracle, this parameter is CLOB. |
To unregister a method, set the script contents parameter to NULL.
The script value is a public method in a class in the MobiLink server classpath (for example, MyClass.MyMethod).
When you ml_add_java_connection_script, the method is associated with the event and script version that you specify. If the version name is new, it is automatically inserted into the ml_version table.
The following example registers the endConnection method of the CustEmpScripts class for the end_connection event.
call ml_add_java_connection_script( 'ver1', 'end_connection', 'CustEmpScripts.endConnection')