Difference between revisions of "Tomcat setenv file"
(Created page with "==JAVA_OPTS Configuration Parameters== JAVA_OPTS parameters configure the Java virtual machine, and also allow system parameters to be passed to the Fusion Registry applicatio...") |
|||
| Line 1: | Line 1: | ||
| + | Configuration for Fusion Registry is principally set by creating a ''setenv.bat'' or ''setenv.sh'' script in the Tomcat ''bin'' directory. | ||
| + | |||
| + | Below are examples for Windows and Linux. | ||
| + | |||
| + | ==Windows== | ||
| + | tomcat\bin\setenv.bat<br> | ||
| + | <samp>set "JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx4G -server -DRegistryProperties=file:///C:/Tomcats/Environments/fusion_registry.properties"<br> | ||
| + | set CLASSPATH=c:\oracle\ojdbc8.jar</samp> | ||
| + | |||
| + | ==Linux== | ||
| + | tomcat/bin/setenv.sh<br> | ||
| + | <samp> | ||
| + | <nowiki>#!/bin/sh</nowiki><br> | ||
| + | export JAVA_OPTS="-Xms128m -Xmx4G -server -DRegistryProperties=file:\\opt\tomcats\environments\fusion_registry.properties"<br> | ||
| + | export CLASSPATH="/opt/oracle/ojdbc8.jar" | ||
| + | </samp> | ||
==JAVA_OPTS Configuration Parameters== | ==JAVA_OPTS Configuration Parameters== | ||
JAVA_OPTS parameters configure the Java virtual machine, and also allow system parameters to be passed to the Fusion Registry application to alter its behaviour. | JAVA_OPTS parameters configure the Java virtual machine, and also allow system parameters to be passed to the Fusion Registry application to alter its behaviour. | ||
Revision as of 02:52, 23 September 2020
Configuration for Fusion Registry is principally set by creating a setenv.bat or setenv.sh script in the Tomcat bin directory.
Below are examples for Windows and Linux.
Windows
tomcat\bin\setenv.bat
set "JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx4G -server -DRegistryProperties=file:///C:/Tomcats/Environments/fusion_registry.properties"
set CLASSPATH=c:\oracle\ojdbc8.jar
Linux
tomcat/bin/setenv.sh
#!/bin/sh
export JAVA_OPTS="-Xms128m -Xmx4G -server -DRegistryProperties=file:\\opt\tomcats\environments\fusion_registry.properties"
export CLASSPATH="/opt/oracle/ojdbc8.jar"
JAVA_OPTS Configuration Parameters
JAVA_OPTS parameters configure the Java virtual machine, and also allow system parameters to be passed to the Fusion Registry application to alter its behaviour.
| Parameter | Purpose | Example |
|---|---|---|
| -Xmx | Sets the maximum amount of memory that can be allocated to the Java heap. This should be a minimum of 4GB and ideally about 75% of available memory on the machine. Setting too low may result in Java 'out of memory' errors. | -Xmx4GBsets the maximum heap size to 4GB |
| -Xms | Sets the initial amount of memory to be allocated to the Java heap. When running in production, there may be a performance benefit to setting this to the same value as -Xmx which avoids the need to grow the heap as memory demand grows. | -Xms128msets the initial heap to 128MB |
| -server | Improves performance by optimising the way the Java Virtual Machine works. | |
| -DRegistryProperties | System Property: Sets a specific path for the Fusion Registry properties file. If not set, the default location is used | -DRegistryProperties=file:\\opt\tomcats\environments\fusion_registry.propertiesIn Linux, sets the properties file location to the path specified. |
| -Djson.legacy.enabled=true or -Djson.legacy.enabled=false (default) |
System Property: Sets whether the Fusion Registry instance uses the legacy Metadata Technology JSON dialect, or the official SDMX-JSON version 1.0 Structure and Data Exchange format. By default, or if the property is explicity set to false, JSON returned will conform to the official SDMX-JSON specification when:
If the property to true, JSON returned will conform to Metadata Technology's legacy JSON format for structures and data. Use this for backward compatibility where existing client-side applications rely on the legacy JSON format. |
-Djson.legacy.enabled=trueForce Fusion Registry to produce and accept structures and data in the legacy Metadata Technology dialect |
| -DLicenseFile= (Data Essentials only) | Sets the location of the License file and the Public key which is used in Data Essentials. | -DLicenseFile=file:///C:/tomcats/RegistryProperties/8080_LICENSE/fusionLicense.fl |