|Storing and Loading JAR Files in GemFire XD / Class Loading Overview|
When you install a JAR file, you specify a unique GemFire XD JAR name, which is a SQL92Identifier. GemFire XD installs the JAR file and automatically loads the JAR file classes into its class loader, and the classes become available to all members of the distributed system (including members that join the system at a later time).
gfxd install-jar -name=APP.toursjar -file=c:\tours.jar -client-bind-address=locator_address -client-port=locator_port
gfxd install-jar -name=toursjar -file=c:\tours.jar -mcast-address=multicast_address -mcast-port=multicast_port
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 gfxd replace-jar or gfxd 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, GemFire XD 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 GemFire XD distributed system, including those that later join the cluster.
gfxd replace-jar -name=APP.toursjar -file=c:\tours2.jar -client-bind-address=locator_address -client-port=locator_port
To replace an existing JAR file, GemFire XD waits to obtain a lock on all datastore members, and then loads the new classes. It also recompiles objects that depend on the JAR file, such as installed listener and procedure implementations. All subsequent invocations of the affected listeners or procedures then use the new implementation.
gfxd remove-jar -name=APP.toursjar -client-bind-address=locator_address -client-port=locator_port