Variables

A variable is a configuration property that can be used to provide a parameter for some values in the system. A variable has a name and a value.

Not all WebSphere components support the use of a variable that one can define using this function. Test your application to verify that variables that you define are being used correctly.

WebSphere variables are used for:

  • Configuring WAS path names, such as JAVA_HOME, and APP_INSTALL_ROOT.

  • Configuring certain cell-wide or cluster-widecustomization values.

Each variable has a scope. A scope is the range of locations in the WAS network where the variable is applicable.

  • A variable with a cell-wide scope is available across the entire deployment manager cell.

  • A variable with a cluster-wide scope is available across the entire cluster in the cell.

  • A variable with a node-level scope is available only on the node and the servers on that node. If a node-level variable has the same name as a cell-wide variable, the node-level variable value takes precedence.

  • A server variable is available only on the one server process. A server variable takes precedence over a variable with the same name that is defined at a higher level.

Use variables in configuration values such as file system path settings. Use the following syntax to refer to a variable:

${variable_name}

The value of a variable can contain a reference to another variable. The value of the variable is computed by substituting the value of the referenced variable recursively.

Variables are useful when concatenating two path variables when the specification does not accept the AND operator. For example, suppose that the following variables exist:

Variable name Variable value
ROOT_DIR /
HOME_DIR ${ROOT_DIR}home
USER_DIR ${HOME_DIR}/myuserdir

The variable reference ${USER_DIR} resolves to the value /home/myuserdir.


 

Related Tasks


Configuring WebSphere variables
IBM Toolbox for Java JDBC driver
Configure and use the jt400.jar file