SQLJ.INSTALL_JAR

The SQLJ.INSTALL_JAR system procedure stores a jar file in a database.

For more information about using JAR files, see the Using Functions and Stored Procedures section in our Developer’s Guide.

Syntax

SQLJ.INSTALL_JAR(IN jar_file_path_or-url VARCHAR(32672),
                 IN qualified_jar_name VARCHAR(32672),
                 IN deploy INTEGER)

jar_file_path_or-url

The path or URL of the jar file to add. A path includes both the directory and the file name (unless the file is in the current directory, in which case the directory is optional). For example:

d:/todays_build/tours.jar

qualified_jar_name

Splice Machine name of the jar file, qualified by the schema name. Two examples:

MYSCHEMA.Sample1
   -- a delimited identifier
MYSCHEMA."Sample2"

deploy

If this set to 1, it indicates the existence of an SQLJ deployment descriptor file. Splice Machine ignores this argument, so it is normally set to 0.

Usage Notes

This procedure will not work properly unless you have first added your procedure to the Derby CLASSPATH variable. For example:

CALL SYSCS_UTIL.SYSCS_SET_GLOBAL_DATABASE_PROPERTY('derby.database.classpath', 'SPLICE.MY_EXAMPLE_APP');

For information about storing and updating stored procedures, and the setting of the Derby classpath, see the Storing and Updating Splice Machine Functions and Stored Procedures topic.

Results

This procedure does not return a result.

Execute Privileges

If authentication and SQL authorization are both enabled, only the database owner has execute privileges on this function by default. The database owner can grant access to other users.

SQL Examples

   -- Make sure Derby classpath variable is correctly set for our examples
CALL SYSCS_UTIL.SYSCS_SET_GLOBAL_DATABASE_PROPERTY(
                    'derby.database.classpath',
                    'SPLICE.SAMPLE1_APP:SPLICE.SAMPLE2');

                       -- install jar from current directory
splice> CALL SQLJ.INSTALL_JAR('tours.jar', 'SPLICE.SAMPLE1_APP', 0);

   -- install jar using full path
splice> CALL SQLJ.INSTALL_JAR('c:\myjarfiles\tours.jar', 'SPLICE.SAMPLE1_APP', 0);

   -- install jar from remote location
splice> CALL SQLJ.INSTALL_JAR('http://www.example.com/tours.jar', 'SPLICE.SAMPLE2_APP', 0);

   -- install jar using a quoted identifier for the
   -- Splice Machine jar name
splice> CALL SQLJ.INSTALL_JAR('tours.jar', 'SPLICE."SAMPLE2"', 0);

See Also