Documentation Center

About parameters in the Content Delivery Storage Layer configuration

Rather than providing hardcoded values in your Storage Layer configuration file, cd_storage_conf.xml, you can specify strings of the format ${PROPERTYNAME} instead, where PROPERTYNAME is the name of an environment variable or of a property that can have a default value and whose value can be set when you are run or install a service that uses the Storage Layer configuration file.

When parameters are used in configuration files you not only have placeholders, you can also specify a default values and/or ensure the value will not be logged in the debug logs.

FormatDescription
${PROPERTYNAME:-default}Use environment variable or Java System Property named variable, and if not defined, use this default value.
${PROPERTYNAME:-default:-*HIDDEN*}Use environment variable or Java System Property named variable, and if not defined, use this default value, but do not log the value in the debug logs
${PROPERTYNAME:-*HIDDEN*}Use environment variable or Java System Property named variable, but do not log the value in the debug logs
${PROPERTYNAME}For these parameters, you need to specify values at startup since no default value is provided
You can turn any quoted string in cd_storage_conf.xml into a parameter in this way.

Values can be set in different ways

For example, to be able to set the value of the database dialect of a database outside cd_storage_conf.xml, you could specify a Storage element as follows:
<Storage Type="persistence" Id="defaultdb" dialect="${dbdialect}" Class="com.tridion.storage.persistence.JPADAOFactory">
The placeholder parameter of the format${PROPERTYNAME} indicates that you should supply the value for this property at startup or install time. In this example, you can supply the dialect attribute in one of the following ways :
  • as a system environment variable
  • define it in the Java Virtual Machine options
  • define it on the command prompt.
You can turn any quoted string in cd_storage_conf.xml into a parameter in this way. Some configuration strings are in cd_storage_conf.xml are already using placeholder parameters.
Setting property-value pairs as environment variables

In Unix, use the export command to create environment variables with the names you specified in cd_storage_conf.xml, and then give them the right value in each context.

For example, the following Unix command creates an environment variable called dbdialect and gives it the value ORACLESQL:
export dbdialect="ORACLESQL"

In Windows, you can specify environment variables and their values in the Windows Control Panel in the Advanced tab of the System Properties screen.

Setting property-value pairs in your Java Virtual Machine options

You can use the -D switch to set a property and its value in your startup script's Java Virtual Machine (JVM) options, a sequence of settings called JVM_OPTIONS in Unix or $jvmoptions in Windows.

For example, in addition to setting memory size and the like for the Java Virtual Machine, this Bash script definition for JVM options also sets a property dbdialect to the value ORACLESQL:
JVM_OPTIONS="-Xrs -Xms256m -Xmx512m -Ddbdialect=ORACLESQL"
The format is slightly different for a Windows Powershell script:
$jvmoptions = "-Xrs", "-Xms256m", "-Xmx512m", "-Ddbdialect=ORACLESQL"
Setting property-value pairs as script command line switches

You can use the -D command line switch, available for Powershell and Bash scripts, to set a property and its value on the command line.

For example, this command passes a property called dbdialect set to ORACLESQL to a Bash script called start.sh:
./start.sh -Ddbdialect=ORACLESQL
For Windows Powershell, the format is the same:
start.ps1 -Ddbdialect=ORACLESQL