sqlj.install_jar
Argument | Description | Restrictions | Syntax |
---|---|---|---|
deploy | Integer that causes the procedure to search for deployment descriptor files in the JAR file | None | Literal Number |
jar_file | URL of the JAR file that contains the Java™ language UDR | Maximum length of the URL is 255 bytes | Quoted String |
public static int explosiveReaction(int ingredient)
/students/data/Courses.jar
EXECUTE PROCEDURE
sqlj.install_jar("file://students/data/Courses.jar", "course_jar");
The sqlj.install_jar( ) procedure assigns the JAR ID, course_jar, to the Courses.jar file that it has installed in the current database.
After you define a JAR ID in the database, you can use that JAR ID when you create and execute a UDR written in the Java™ language. (You must hold the Resource privilege or the DBA privilege on the database, and also hold the Usage privilege on the Java™ language, before you can create or drop a Java™ UDR.)
When you specify a nonzero number for the third argument, the database server searches through any included deployment descriptor files. For example, you might want to include descriptor files that include SQL statements to register and grant privileges on UDRs in the JAR file.
If the IFX_EXTEND_ROLE configuration parameter is enabled (which is its default setting), only the DBSA or users who hold the EXTEND role are able to execute the sqlj.install_jar( ) procedure. When IFX_EXTEND_ROLE is disabled, any user can execute sqlj.install_jar( ).