sqlf install-jar

Installs a JAR file and automatically loads the JAR file classes into the SQLFire class loader. This makes the JAR classes available to all members of the distributed system (including members that join the system at a later time).

Syntax


To install a local JAR file to SQLFire, use the syntax:

sqlf install-jar -file=<path or URL> -name=<identifier>
     [-bind-address=<address>]
     [-client-bind-address=<address>]
     [-client-port=<port>]
     [-extra-conn-props=<properties>] 
     [-help] [-locators=<adresses>]
     [-mcast-address=<address>]
     [-mcast-port=<port>]
     [-password[=<password>]]
     [-user=<username>]

This table describes options for the sqlf install-jar command. Default values are used if you do not specify an option.

Option Description
-file

The local path of the JAR file to install, or a URL that links to the JAR file.

This argument is required.

-name A unique identifier for the JAR installation. The identifier you provide must specify a schema name delimiter. For example: APP.myjar.

This argument is required.

-bind-address The address to which this peer binds for receiving peer-to-peer messages. By default sqlf uses the hostname, or localhost if the hostname points to a local loopback address.
-client-bind-address

The hostname or IP address on which a SQLFire locator listens for client connections. The default is "localhost."

Use this option with -client-port to attach to a SQLFire cluster as a thin client and perform the command.

-client-port

The port on which a SQLFire locator listens for client connections. The default is 1527.

Use this option with -client-bind-address to attach to a SQLFire cluster as a thin client and perform the command.

-extra-conn-props

A semicolon-separated list of properties to use when connecting to the SQLFire distributed system.

-help, --help

Display the help message for this sqlf command.

-locators

The list of locators as comma-separated host[port] values, used to discover other members of the distributed system.

Using -locators creates a peer client member to execute the sqlf command.

-mcast-address

The multicast address used to discover other members of the distributed system. This value is used only when the -locators option is not specified. The default multicast address is 239.192.81.1.

Use this option with -mcast-port to attach to a SQLFire cluster as a peer client and perform the command.

-mcast-port

The multicast port used to communicate with other members of the distributed system. If zero, multicast is not used for member discovery (specify -locators instead). This value is used only if the -locators option is not specified.

Valid values are in the range 0–65535, with a default value of 10334.

Use this option with -mcast-address to attach to a SQLFire cluster as a peer client and perform the command.

-password

If the servers or locators have been configured to use authentication, this option specifies the password for the user (specified with the -user option) to use for booting the server and joining the distributed system.

The password value is optional. If you omit the password, sqlf prompts you to enter a password from the console.

-user If the servers or locators have been configured to use authentication, this option specifies the user name to use for booting the server and joining the distributed system.

Description

Specify one of these pairs of options with the command to connect to a SQLFire Distributed system and install a JAR file:
  • Use both -client-bind-address and -client-port to connect to a SQLFire cluster as a thin client and perform the command.
  • Use both mcast-port and -mcast-address, or use the -locators property to connect to a SQLFire cluster as a peer client and perform the command.

The -name that you provide for the JAR must be a unique identifier. You must include a schema name to qualify the identifier. You can use the identifier with later calls to sqlf replace-jar or sqlf remove-jar.

The -file option specifies the location of the JAR file to install using either a local path or a URL.

After installing the JAR to the distributed system, SQLFire automatically loads the JAR file classes into its class loader; you do not need to explicitly load classes after installing the JAR. The JAR and its classes are available to all members of the SQLFire distributed system, including those that later join the cluster.

Note: After you install a JAR file, you cannot modify any of the individual classes or resources within the JAR file. Instead, you must replace the entire JAR file to update a class.

See Storing and Loading JAR Files in SQLFire.

Examples

This command connects to a SQLFire network server running on localhost:1527, and installs a JAR file named tours.jar to the APP schema:
sqlf install-jar -name=APP.toursjar -file=c:\tours.jar
This command connects to a SQLFire network server running on myserver:1234 to install the JAR file:
sqlf install-jar -name=APP.toursjar -file=c:\tours.jar 
     -client-bind-address=myserver -client-port=1234
This command connects as a peer client to a SQLFire system running on multicast port 1234, and installs the JAR file:
sqlf install-jar -name=APP.toursjar -file=c:\tours.jar
    -mcast-port=1234 -extra-conn-props=host-data=false