Use a JNDI property file in the file system
Overview
We can place the JNDI property file directly into the file system of the web application server. Useful for a stand-alone test server when experimenting with JNDI properties. We change the file with a text editor, then restart to enable the changed configuration.
Point property ibm.worklight.jndi.file to location of JNDI file
WAS Liberty profile
Place the property file inside the server directory of the Liberty server...
$LIBERTY_HOME/usr/servers/worklightServer/mywlconfig.properties
Edit...
$LIBERTY_HOME/usr/servers/worklightServer/bootstrap.properties
...and set...
ibm.worklight.jndi.file=mywlconfig.properties
Alternatively, instead of editing bootstrap.properties, create file...
$LIBERTY_HOME/usr/servers/worklightServer/jvm.options
...and add, for example...
-Dibm.worklight.jndi.file=mywlconfig.properties
Restart the web application server.
WAS full profile
Determine a suitable location...
- For a stand-alone server:
$WAS_INSTALL/profiles/myprofile/config/mywlconfig.properties
- For deployment to a dmgr cell:
$WAS_INSTALL/profiles/myprofile/config/cells/mycell/mywlconfig.properties
- For deployment to a dmgr cluster:
$WAS_INSTALL/profiles/myprofile/config/cells/mycell/clusters/cluster-name/mywlconfig.properties
- For deployment to a dmgr node:
$WAS_INSTALL/profiles/myprofile/config/cells/mycell/nodes/node-name/mywlconfig.properties
- For deployment to a dmgr server:
$WAS_INSTALL/profiles/myprofile/config/cells/mycell/nodes/node-name/servers/server-name/mywlconfig.properties
...then set ibm.worklight.jndi.file in JVM custom properties.
Apache Tomcat
We must place the property file inside the conf directory of the Apache Tomcat server; for example, place it in $TOMCAT_HOME/conf/mywlconfig.properties.
Edit...
$TOMCAT_HOME/conf/catalina.properties file
...and add the property ibm.worklight.jndi.file to point to the property file; for example, ibm.worklight.jndi.file=../conf/mywlconfig.properties.
Alternatively, on UNIX systems, instead of editing catalina.properties, create or edit the $TOMCAT_HOME/bin/setenv.sh file and add, for example:
CATALINA_OPTS="$CATALINA_OPTS -Dibm.worklight.jndi.file=../conf/mywlconfig.properties"or on Microsoft Windows systems, create or edit the $TOMCAT_HOME/bin/setenv.bat file and add , for example:set CATALINA_OPTS=%CATALINA_OPTS% -Dibm.worklight.jndi.file=../conf/mywlconfig.propertiesUse the normal web archive (WAR) files of the web applications. They can be installed as described elsewhere in Install and configure.
Restart the web application server.
- Set the file pointer property (WAS full profile)
Define the ibm.worklight.jndi.file property through the administration console of the WAS full profile.
Parent topic: JNDI properties file for transfer