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


Chapter 5 Advanced Topics : Global Variables

Global Variables
You can define variables for your project, either during configuration or at deployment. Global variables are defined in TIBCO Designer during configuration.
A TIBCO project contains a number of predefined global variables. For some of the variables, default values are assigned. You can use TIBCO Designer to specify additional variables and, optionally, define their values.
At runtime, a client application can choose to overwrite the variable values or use the predefined value for the global variable.
Examples for global variables include:
Defining Variables in TIBCO Designer
To define and use variables within TIBCO Designer:
1.
2.
3.
4.
5.
If your application doesn’t override the variable value, it is used. The program code can, however, override it. You can also override it upon startup using a command-line argument.
Defining Service-Settable Variables in TIBCO Designer
If you wish to be able to change the value of a variable on a per-service basis, you can do so following these steps:
1.
2.
3.
Setting Variable Values
You can preset variable values when you define the variables. You can then override any existing values as part of your application code or in the properties file for the application. For some applications, you can also override variables using the command-line.
Variables set on the command line override variables set in the properties file and variables set in the properties file override variables set in the application.
Change a variable value using the TIBCO Administrator GUI by selecting:
An application’s Advanced tab to set application-specific variables.
A service’s Advanced tab to set service-specific variables.
A service instance’s Advanced tab to set service instance-specific variables.
A variable value can be changed in a properties file or on the command line:
Locally define the value for a variable in the properties file for a specific domain repository using the tibco.clientVar.varname property. The local value takes precedence over any global value.
 
   -system:clientVar varName=value
Multiple -system:clientVar options can be specified on the command line. If the same variable already exists in the command line, the later one replaces the first one. No space is allowed for either varName or the value, when using -system:clientVar.
You can also set variable values using the AppManage utility. This can be useful if only a few out of a large number of global variables change between domains.

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