Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > EXECUTE PROCEDURE >

sqlj.install_jar

Use the sqlj.install_jar( ) procedure to install a jar file in the current database and assign it a jar identifier.

Read syntax diagramSkip visual syntax diagramsqlj.install_jar:
 
|--sqlj.install_jar--------------------------------------------->
 
                                (1)      .-0------.
>--(--jar_file--,--| Jar Name |-------,--+-deploy-+--)----------|
 

Notes:
  1. See Jar Name

Element 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 UDR written in Java 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 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 Java.

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.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]