Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Adapter Configuration : Variable Substitution

Variable Substitution
The Adapter SDK variable substitution mechanism can override global variables predefined in the project repository in a restricted manner. Predefined variables can be viewed and set in TIBCO Designer. Variables are specified as %%VARNAME%% and contain no white space.
Variable Substitution Mechanism
Variable substitution allows users to accomplish the following tasks:
Locally define the value for a variable in the properties file for a specific project repository. The local value takes precedence over any global value.
-system:clientVar varName=value
Multiple variables can be specified using the command line -system:clientVar.If the same variable already exists in the command line, the newly input value replaces the existing value. No space characters are allowed for either varName or the value, when using -system:clientVar.
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.
Specifying Variables
Custom adapters can specify variables in the following ways:
In a properties file (using the tibco.clientVar.<varname> property)
On the command line (using -system:clientVar varName=value)
The order of precedence is: command-line values overwrite values set in the properties file, properties file values overwrite values set in the repository.
Specifying Variables Using TIBCO Designer
Global variables provide an easy way to set defaults for use throughout a project.
For example, assign the value 7474 to the predefined global variable RvDaemon, then use the variable in different sessions in an adapter. If you want to change the TIBCO Rendezvous daemon for an adapter, globally set it to a different value or override it from the command line.
To specify global variables using TIBCO Designer:
1.
2.
In the project panel, click the Global Variables tab. All currently defined global variables are displayed in the project panel.
Figure 3 Global Variables Tab
3.
To edit the global variables, click the Open Advanced Editor button .
In the Global Variables dialog, you can do the following:
To add a global variable group, click the Add a Variable Group button . Specify the name of the group, then press Enter.
To add a global variable, click the Add a Variable button . A new global variable item is added to the bottom of the list. With a variable group selected, you can click this button to add variables to the group. Enter the variable name and, optionally, the value. Press Enter when done.
4.
When the project is deployed and the configured components are run, all occurrences of the global variable name are replaced with the global variable value (unless it was overridden in a way that had higher precedence).
A number of global variables are predefined. See Predefined Global Variables. You can add definitions of any variables you need to the predefined variables.
Specifying Variables in the Properties File
To specify variables in a properties file, use the following parameter:
 
tibco.clientVar.varname
Specifying Variables on the Command Line
To specify one or more variables on the command line, use the following syntax:
 
-system:clientVar varName=value
Predefined Global Variables
Table 17 lists the predefined global variables. Some global variables are automatically used within the system when an adapter instance is configured.
Defaults to the TIBCO Designer project name. It can be any string value. This global variable is used by the system to partially define the subject name defined for a service.
The default value for a file-based local project is MyDomain. The value for a server-based project is the domain to which the project was saved.
True indicates that a Hawk microagent is defined for the adapter. False indicates the microagent is not to be used. Default is False in TIBCO Designer but True for SDK-based adapters.
Tells applications where the JMS daemon is located. Setting this value mostly makes sense in early stages of a project, when only one JMS daemon is used.
TIBCO Rendezvous routing daemon (rvrd) to be used. See TIBCO Administrator Server Configuration Guide for instructions on how to set up a domain using rvrd.
Provides support for external SSL files at runtime by allowing applications to reference external trusted certificates instead of using the certificate in the EAR file.
Use this variable to specify the path of the directory in which all the Trusted Certificates are stored. This variable is valid only for TIBCO ActiveMatrix BusinessWorks and TIBCO JMS.
For more information on SSL, refer to TIBCO Designer User’s Guide.
Provides support for external SSL files at runtime by allowing applications to reference external trusted certificates instead of using the certificate in the EAR file.
TIBCO Rendezvous network. This variable needs only be set on computers with more than one network interface. If specified, the TIBCO Rendezvous daemon uses that network for all outbound messages.
TIBCO Rendezvous service. The Rendezvous daemon divides the network into logical partitions. Each transport communicates on a single service. A transport can communicate only on the same service with other transports.
Computer on which the TIBCO Rendezvous agent runs. This variable is only relevant if you are using the TIBCO Rendezvous Agent (rva) instead of the TIBCO Rendezvous daemon, and if you have configured a non-default setup. See TIBCO Rendezvous Administration for instructions on how to specify the rva parameters.
TCP port where the TIBCO Rendezvous agent (rva) listens for client connection requests. See TIBCO Rendezvous Administration for instructions on how to specify the rva parameters.
TIBCO Rendezvous daemon used in the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details.
TIBCO Rendezvous network used by the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details.
TIBCO Rendezvous service used by the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved