Administer WAS variables

 

Overview

In WebSphere Application Server, substitution variables are used to represent values in configuration files. For example, the variable LOG_ROOT represents the value...

/QIBM/UserData/WebAS5/Base/instance/logs

To change the location of the log files for the instance, change the value of the LOG_ROOT variable to the new path.

You can define variables for the cell, node, and server scopes. A variable applies to all configuration files in the scope for which it is defined. For example, WAS defines the APP_INSTALL_ROOT variable for the node scope. The value defined for the node applies to all application servers within that node.

If variables in multiple scopes have the same name, the variable with the narrowest scope takes precedence. For example, if you have two application servers, called myServer1 and myServer2, you can define APP_INSTALL_ROOT at the server level for each application server. If you define a separate APP_INSTALL_ROOT variable for myserver1, but not for myServer2, this is how WAS resolves the values:

  1. For myServer1, configuration files use the value defined for the server scope.

  2. For myServer2, APP_INSTALL_ROOT is not defined for the server scope. As a result, configuration files for myServer2 use the value defined for the node scope.

 

Create substitution variables

To add a new substitution variable, follow these steps:

  1. Start the administrative console.

  2. Expand...

    Environment | Manage WebSphere Variables

  3. Specify the scope for which you want to define the variable and click Apply.

  4. Click New.

  5. Specify a name and value for the variable.

  6. Click OK.

  7. Save the configuration.

 

Modify substitution variables

To modify a substitution variable, follow these steps:

  1. Start the administrative console.

  2. Expand...

    Environment | Manage WebSphere Variables

  3. Specify the scope that contains the variable that you want to modify and click Apply.

  4. Click the name of the variable that you want to modify.

  5. Make the changes.

  6. Click OK.

  7. Save the configuration.

 

Remove substitution variables

To remove a substitution variable, follow these steps:

  1. Start the administrative console.

  2. Expand...

    Environment | Manage WebSphere Variables

  3. Specify the scope that contains the variable that to remove and click Apply.

  4. Select the checkbox for the variable that to remove.

  5. Click Delete.

  6. Save the configuration.