Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 8 Advanced Topics : Using Substitution Variables

Using Substitution Variables
The variable substitution mechanism can override substitution variables predefined in the project in a controlled manner. Predefined variables can be viewed and set in TIBCO Business Studio. Variables are specified as %%VARNAME%% and cannot contain any blank space.
Variable substitution allows you to accomplish the following.
Specify the value for a variable in a properties file. This overrides the project repository and values set in code, but not variables set on the command line.
Variables can be used anywhere in the configuration and will be replaced by the locally defined adapter instance.
Variable Specification
The Adapter Service Engine can specify variables in the project during configuration using TIBCO Business Studio. It can also specify variables in a properties file. The properties file values overwrite values set in the project.
Specifying Substitution Variables Using TIBCO Business Studio
Substitution variables provide an easy way to set defaults for use throughout your project.
For example, you could assign the value 7600 to the predefined substitution variable RvaPort, and then use the variable in different sessions in the adapter service engine. To change the TIBCO Rendezvous daemon for the adapter service engine, globally set it to a different value or override it from the command line.
To use substitution variables in your project, follow these steps:
1.
2.
Expand defaultVars under your project in the Project Explorer panel, and then double-click defaultVars.substvar. All currently defined substitution variables are displayed in the Editor panel on the right.
 
You can perform the following tasks:
To assign or change a variable value, select the variable from the Defined Substitution Variables section, then go to the Details section, and enter the new value in the Value field.
To add a substitution variable, click the Add button in the Defined Substitution Variables section. A new substitution variable entry is added to the bottom of the list. Enter the variable name, type, and, optionally, the value and description.
3.
To use the substitution variable in the fields for a resource, enter the variable name enclosed with %% on both sides or pick a substitution variable from the Binding Editor.
When the project is deployed and the configured components are running, all occurrences of the substitution variable name are replaced with the substitution variable value (unless it was overridden in a way that had higher precedence). For example, RvService would be replaced with 7500.
Changing Substitution Variables at Runtime
At runtime, you can update the values of the substitution variables using TIBCO ActiveMatrix Administrator.
Figure 74 shows the Substitution Variables editor in TIBCO ActiveMatrix Administrator, where you can specify runtime values for substitution variable.
Figure 74 Substitution Variables in TIBCO ActiveMatrix Administrator
A number of substitution variables are predefined. See Predefined Substitution Variables for information. You can add definitions for any of the predefined variables you need.
Predefined Substitution Variables
Table 21 lists and explains the predefined substitution variables. Some of them are automatically used within the system when an adapter instance is configured.
Used by the system when defining the path name of the TIBCO Rendezvous certified messaging ledger file. The default is the root installation directory.
Used by the system to partially create the path name for the log file used by the adapter. The default is the root installation directory.
The default value is Domain. This value can be any string value. This variable is used by the system to partially define the subject name defined for a service.
Specifies where the EMS server is located. Setting this value mostly makes sense in early stages of a project, when only one EMS server is used.
Used by the system to identify the TIBCO Rendezvous routing daemon. See TIBCO Rendezvous Administration for details about specifying the routing daemon name.
Used by the system to identify the TIBCO Rendezvous daemon parameter. The parameter instructs the transport object about how and where to find the Rendezvous daemon and establish communication. The default value is "tcp: 7500", which is the default value used by the Rendezvous daemon. See TIBCO Rendezvous Concepts for details about specifying the daemon parameter.
Used by the system to identify the TIBCO Rendezvous network parameter. Every network transport communicates with other transports over a single network interface. On computers with more than one network interface, the network parameter instructs the TIBCO Rendezvous daemon to use a particular network for all outbound messages from this transport. See TIBCO Rendezvous Concepts for details about specifying the network parameter.
Used by the system to identify the TIBCO Rendezvous service parameter. The Rendezvous daemon divides the network into logical partitions. Each transport communicates on a single service; a transport can communicate only with other transports on the same service. The default value is 7500.You can change the default value depending on your service requirement. See TIBCO Rendezvous Concepts for details about specifying the service parameter.
Used by the system to identify the computer on which the TIBCO Rendezvous agent runs. See TIBCO Rendezvous Administration for details about specifying the rva parameters.
Used by the system to identify the TIBCO Rendezvous agent TCP port where the agent listens for client connection requests. See TIBCO Rendezvous Administration for details about specifying the rva parameters.
adpsft8.connectionPool.
ReconnectionAttemptsBeforeSuspend
 

Copyright © TIBCO Software Inc. All Rights Reserved