SQLJ.INSTALL_JAR

The SQLJ.INSTALL_JAR system procedure installs a JAR file in SQLFire.

To use the sqlj.install_jar procedure, the JAR file path must be available on the specific SQLFire data store to which the client is connected. If the client connects directly to a known SQLFire server, then only that server requires the JAR file to be available at the specified path when the procedure executes. However, if the client connects using a locator then it may be connected to any available server in the distributed system. In this case, the JAR file path should be available to all members of the SQLFire cluster (for example, from a fileshare location such as z:\) to ensure that the procedure can execute.

Note: If you cannot provide a common JAR location to ensure that the sqlj.install_jar executes, use the sqlf install-jar command instead. SQLFire also provides an alternate mechanism to inject your JAR file into the SQLFire system from the client itself. See Installing a JAR File Directly into SYS.JARS.

Syntax

SQLJ.INSTALL_JAR(IN JAR_FILE_PATH VARCHAR(32672), 
                 IN QUALIFIED_JAR_NAME VARCHAR(32672),
                 IN DEPLOY INTEGER)
JAR_FILE_PATH
The path and physical name of the JAR file to add. For example:
z:\todays_build\tours.jar
Use a file system path appropriate for the operating system (such as z:\filename.jar or /opt/filename.jar). You cannot specify a HTTP URL to use for loading the JAR file.
Note: The JAR file path must be available on the specific SQLFire data store to which the client is connected. If the client connects directly to a known SQLFire server, then only that server requires the JAR file to be available at the specified path when the procedure executes. However, if a client connects using a locator then they may be connected to any available server in the distributed system. In this case, the JAR file path should be available to all members of the SQLFire cluster (for example, from a fileshare location such as z:\) to ensure that the procedure can execute.
After installing the JAR file to one SQLFire member, the JAR is available to all other members in the distributed system, including members that join the distributed system at a later time.
QUALIFIED_JAR_NAME
The SQLFire name of the JAR file, qualified by a valid schema name. Two examples are:
MYSCHEMA.Sample1
 -- a delimited identifier
MYSCHEMA."Sample2"
You can use the JAR name in subsequent calls to SQLJ.REPLACE_JAR or SQLJ.REMOVE_JAR.
DEPLOY
This integer argument is used to specify an alias for the JAR file. However, SQLFire ignores this argument, so it is normally set to 0.

Example

-- SQL statement
CALL SQLJ.INSTALL_JAR('tours.jar', 'APP.Sample1', 0)

-- SQL statement
-- using a quoted identifier for the 
-- SQLFire jar name
CALL SQLJ.INSTALL_JAR('tours.jar', 'APP."Sample2"', 0)