Scalable Database Server, HiRDB Version 8 Description
Following is the procedure for creating and executing a Java stored routine:
Figure 5-5 shows the flow of events from creation of a Java stored routine to its execution.
Figure 5-5 Flow from creation to execution of a Java stored routine
In this step, you code either a procedure or a function in Java, then you compile the resulting Java program. Compilation produces a Class file. You can then test and debug the Class file, using the Java virtual machine at the client, and create a JAR file from the Class file.
In this step, you register the JAR file into HiRDB.
You use the CREATE PROCEDURE or the CREATE FUNCTION statement to define a Java stored routine from the JAR file.
As in the case of executing a stored procedure or a stored function, you execute the SQL by specifying either a CALL statement or a function call. The CALL statement causes a Java method to be executed as a Java stored procedure. The function call causes a Java method to be executed as a Java stored function. The Java stored routine is executed on the Java virtual machine at the server.
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.