Nonstop Database, HiRDB Version 9 Description
The following is the general procedure for creating and executing an external Java stored routine.
The following figure shows the flow of events from the creation of an external Java stored routine to its execution.
Figure 5-5 Flow from creation to execution of an external 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 new JAR file in HiRDB.
You use the CREATE PROCEDURE or CREATE FUNCTION statement to define an external 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 external Java stored routine is executed on the Java virtual machine at the server.
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.