java.properties revision 6331
5f5870385cff47efd2f58e7892f251cf13761528Timo Sirainen# This file contains the java properties that the different command lines will
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# use when launched. You can specify the location of the java binaries to be
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# used and the java arguments to be passed to the command line. The follwoing
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# examples assumes that the Java virtual machine supports those options.
7ef3553585e556f35d5919589cfdc1de3329e4bbTimo Sirainen
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# For instance you can specify to use the -server argument for the start-ds
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# command with an initial heap size of 256 Mb by setting
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainenstart-ds.java-args=server -d64 -Xms256m -XX:+UseCompressedOops -Duser.language=en -Duser.country=US
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# For big|production servers (NewSize ~= 2/3*Xmx)
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen#start-ds.java-args=-server -d64 -Xms2G -Xmx2G -XX:NewSize=1408M -XX:MaxNewSize=1408M -XX:+UseCompressedOops -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Duser.language=en -Duser.country=US
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# To set the java virtual machine to be used for a given command-line you must
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# set the property <command-line-name>.java-home and to specify java arguments
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# you must set the property <command-line-name>.java-args.
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen#
7ef3553585e556f35d5919589cfdc1de3329e4bbTimo Sirainen# There are certain command-lines (import-ldif, export-ldif, backup, restore)
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# that can work on two modes: online and offline. When they run in online mode
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# (the server is running and the user specifies LDAP parameters to launch the
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# operation) the operation is not actually performed in the Java Virtual Machine
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# of the command-line but on the server side. This is why when launching these
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# command-lines on online-mode it is preferred to use the -client argument for
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# the java virtual machine (and even limit the maximum size of the heap).
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# However when these command-lines are launched in offline mode it is
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# recommended to use the -server argument to launch the command-line.
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# This is the reason why you can specify different java properties for both
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# modes (for instance import-ldif.offline.java-args and
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# import-ldif.online.java-args).
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen#
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# IMPORTANT NOTE: Once you have modified this file and set the java properties
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# that you want the command-lines to use you must run the command-line
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# bin/dsjavaproperties for the different scripts to be updated with the
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# specified settings.
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen#
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# Examples:
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# Specify to overwrite the content of the environment variable OPENDJ_JAVA_HOME
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# (i.e. the contents of this properties file for the java home will be analyzed
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# before checking whether OPENDJ_JAVA_HOME is specified in the environment):
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen#overwrite-env-java-home=true
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# Specify to overwrite the content of the environment variable OPENDJ_JAVA_ARGS
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# (i.e. the contents of this properties file for the java args will be analyzed
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# before checking whether OPENDJ_JAVA_ARGS is specified in the environment):
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen#overwrite-env-java-args=true
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# Specify to use a particular Java Virtual Machine for the offline import:
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# import-ldif.offline.java-home=/usr/jdk1.7
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# Specify to use -server argument when running import-ldif on server mode:
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainenimport-ldif.offline.java-args=-server -d64
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# Specify to use -client argument when running dsconfig:
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen#dsconfig.java-args=-client
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# Specify to use the java home for all the command-lines that have not
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# an associated property defined:
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen#default.java-home=/usr/jdk1.6
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# Specify to use the -client argument for all the command-lines that have not
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen# an associated property defined:
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen#default.java-args=-client
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen