Using Global Variables


The variable substitution mechanism can override global variables predefined in the project in a restricted manner. Predefined variables can be viewed and set in TIBCO Designer. Variables are specified as %%VARNAME%% and cannot contain any white space.

Variable substitution allows you to accomplish the following.

Variable Specification

The adapter can specify variables:

Properties file values overwrite values set in the project.

Specifying Variables Using TIBCO Designer

Global variables provide an easy way to set defaults for use throughout your project.

For example, you could assign the value 7474 to the predefined global variable RvDaemon. You can then use the variable in different sessions in your adapter. If you wish to change the TIBCO Rendezvous daemon for your adapter, you can globally set it to a different value or override it from the command line.

To use global variables in your project, follow these steps:
  1. In the project panel, select the Global Variables tab.
  2. The project panel is updated to display all currently defined global variables. You now have these choices:

    • To assign or change a variable value, select that region and triple-click the variable. The variable expands so you can change either the variable name or the variable value. Press Enter when you’re done.

    • To add a new global variable group, click the leftmost icon. Specify the name of the group, then press Enter. With the group icon selected, you can click the abc icon to add variables to the group.
    • To add a global variable, click the abc icon. A new global variable item is added to the bottom of the list. Supply the variable name and, optionally, the value. Press Enter when you’re done.

The global variable is now displayed in the global variables list.

  1. When you want to use the global variable in the fields of a resource, enter the variable name surrounded by %% on both sides.
  2. 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). For example, RvServiceTest would be replaced with 7800.

A number of global variables are predefined. See Predefined Global Variables for information. You may add definitions of any variables you need to the predefined variables.

Predefined Global Variables

The next table lists and explains the predefined global variables. Some global variables are automatically used within the system when an adapter instance is configured.

Table 13 Predefined Global Variables
Variable
Description
Deployment
Defaults to the TIBCO Designer project name. This value can be any string value. This global variable is used by the system to partially define the subject name defined for a service.
DirLedger
Specifies the path name of the TIBCO Rendezvous certified messaging ledger file. The default is the root installation directory.
DirTrace
Specifies the path name for log file used by the adapter. The default is the root installation directory.
Domain
The default value for file-based local projects is MyDomain. The value for server-based projects is the domain to which the project was saved.
HawkEnabled
Indicates whether TIBCO Hawk is used to monitor the adapter. True indicates that a Hawk microagent is defined for the adapter. False indicates the microagent is not to be used.
JmsProviderUrl
Specifies where the JMS server is located. Setting this value mostly makes sense in the early stages of a project, when only one JMS server is used.
RemoteRvDaemon
TIBCO Rendezvous routing daemon (rvrd) to be used. See TIBCO Administrator Server Configuration Guide for details about setting up a domain using rvrd.
RvDaemon
TIBCO Rendezvous daemon. Sessions use this daemon to establish communication. The default value is 7500.
RvNetwork
TIBCO Rendezvous network. This variable need only be set on computers with more than one network interface. If specified, the TIBCO Rendezvous daemon uses that network for all outbound messages.
In most cases, you can leave the default.
RvService
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.
Unless you are using a non-default TIBCO Rendezvous configuration, you should leave the default (7500).
RvaHost
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 details about specifying the rva parameters.
RvaPort
TCP port where the TIBCO Rendezvous agent (rva) listens for client connection requests. See TIBCO Rendezvous Administration for details about specifying the rva parameters. Defaults to 7501.
TIBHawkDaemon
TIBCO Rendezvous daemon used in the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details about this parameter.
TIBHawkNetwork
TIBCO Rendezvous network used by the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details about this parameter.
TIBHawkService
TIBCO Rendezvous service used by the TIBCO Hawk session. See the TIBCO Hawk Installation and Configuration manual for details about this parameter.


TIBCO Adapter™ for COM User’s Guide
Software Release 5.3, September 2005
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com