Using Variable Substitution in Streaming Connection Alias Parameters
You can dynamically build the configuration for a streaming connection alias by using global or system variables in the parameter value. Variables can be the entire value or part of the specified value. At run time, Integration Server substitutes the variable value for the variable name.
Note:
The use of global and system variables in parameter values is limited to the Provider URI, Client ID, and Configuration Properties fields in a streaming connection alias.
To specify a variable name in a parameter value, use the string ${variableName} where variableName is a:
Server-level global variable
Package-level global variable
System variable. A system variable name starts with the system: (inclusive of the colon) and are reserved for system properties. Currently, the only supported system property is: system:hostname. Where hostname is the name of the server on which
Integration Server runs. The system:hostname value cannot be configured .
When a parameter specifies a global variable, Integration Server performs substitution by first looking for the variable in the package in which the connection alias is saved. If Integration Server does not find a variable of that name, it looks for a server-level global variable. If Integration Server does not find a server-level global variable with a matching name, Integration Server throws an exception stating that the variable cannot be found.
The following table provides examples of variable substitution for streaming connection alias configuration.
Field | Value with variable name | Runtime result |
Provider URI | ${my.url.var} | Provider URI value is set to the value of the global variable named my.url.var. |
Provider URI | localhost://${my.port.var} | Provider URI value is partially hard-coded and partially set to the value of the global variable named my.port.var. |
Client ID | ${system:hostname} | The Client ID value is set to the value of the hostname system variable. |
Configuration Parameters | sasl.jaas.config = user="${my.user.var}" password="${my.secure.pass.var}" | The sasl.jaas.config property is partially hard-coded (user= and password=) and the values of user and password are set to the values of the global variables my.user.var and my.secure.pass.var respectively. If a global variable is a password, Integration Server displays a mask for the resolved value. For example, if the Is Password? check box is selected for the my.secure.pass.var global variable, when Integration Server displays a mask for the resolved variable value. |
For more information about global variables, see
Managing Global Variables.