Post

3 followers Follow
0
Avatar

Recomended location to put third party jars

Where to put the ojdbc jar and other 3rd party jars required for dbsync?Inside the ext-lib?Do we need to modify the gfxd to include those jars or setting classpath is enough.?

arghya sadhu

Please sign in to leave a comment.

3 comments

0
Avatar

Hi Arghya. You can easily reference your jars by setting the '-classpath' option with gfxd. There is no need to place them in a special location.

Jens Deppe 0 votes
0
Avatar

It should be enough to put the files on the classpath of a GFXD server process.
You can place all custom dependencies in a separate lib folder and then place all jars in this folder to the CLASSPATH in a GFXD server startup command:

GFXD_LIB=$GEMFIRE_XD_HOME/mylibs
GFXD_CLASSPATH="$(ls -1 $GFXD_LIB/*.jar | tr '\n' ':' | head -c -1)"
gfxd server start -classpath=$GFXD_CLASSPATH ....

You can also deploy and distribute a jar to all GFXD cluster instances dynamically at runtime using
gfxd install-jar -file=my.jar -name=myjar
command. In this case you should be careful no to keep any state in global static variables since it could be problematic to replace the implementation at runtime without restarting the GFXD node.

Serhiy Shcherbakov 0 votes