sqlj.install_jar

Use the sqlj.install_jar( ) procedure to install a JAR file in the current database and assign to it a JAR identifier.
(explicit id sij001) sij001

sqlj.install_jar

sqlj.install_jar
(jar_file, <Jar Name>[] , { 0 | deploy } )
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
For example, consider a Java class Chemistry that contains the following static method explosiveReaction( ):
public static int explosiveReaction(int ingredient)
Here the Chemistry class resides in this JAR file on the server computer:
/students/data/Courses.jar 
You can install all classes in the Courses.jar file in the current database with the following call to the sqlj.install_jar( ) procedure:
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( ).