Java Trigger - 3
OK to call Java static methods directly
java.lang.System.currentTimeMillis()
Use CALL for void methods
CALL current_java_timestamp.setNanos
Connection variables can be Java objects
CREATE VARIABLE
global_java_random java.util.Random;
SET global_java_random
= NEW java.util.Random();
Notes:
Static methods may be called without bothering to instantiate an object. In other words, you can make direct references to methods inside classes, including your classes and those that come with the JDK. Methods that don't return function values can be invoked from SQL via CALL. Persistent connection-level variables can be Java objects.