Try OpenEdge Now
skip to main content
SQL Development
Stored Procedures and Triggers : Stored procedure fundamentals : Java snippet
 

Java snippet

The core of the stored procedure is the Java snippet. The snippet contains a sequence of Java statements. When it processes a CREATE PROCEDURE statement, OpenEdge SQL adds header and footer "wrapper" code to the Java snippet. This wrapper code:
*Declares a class with the name username_procname_SP, where username is the user name of the database connection that issued the CREATE PROCEDURE statement and procname is the name supplied in the CREATE PROCEDURE statement.
*Declares a method within that class that includes the Java snippet. When an application calls the stored procedure, the SQL engine calls the Java virtual machine to invoke the method of the username_procname_SP class.
* Structure of stored procedures