Using the Tuxedo ATMI Workstation Component
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The following sections describe using the BEA Tuxedo ATMI Workstation component on both Windows and UNIX systems:
You can develop client programs targeted for workstations in the same way that you develop client programs within the BEA Tuxedo system administrative domain (that is, native clients). With a few exceptions, all ATMI and FML functions available to the native client are also available to the Workstation client.
Note: tpadmcall()
is an example of an ATMI function that is available to the native client but not to the Workstation client.
Interoperability between BEA Tuxedo release 7.1 or later Workstation clients and applications based on pre-7.1 releases of the BEA Tuxedo system is supported in any of the following situations:
A BEA Tuxedo release 7.1 or later Workstation client with multiple threads in a single context cannot interoperate with a pre-7.1 release of the BEA Tuxedo system.
You compile and link-edit Workstation client programs using the buildclient(1) command. If you are building a Workstation client on a native node (that is, one on which the complete BEA Tuxedo system is installed), use the -w
option to indicate the client should be built using the workstation libraries. Otherwise, on a native node, where both native and workstation libraries are present, the default is to use the native libraries. In this case, using the -w
option ensures that the correct libraries for a Workstation client are used. On a workstation, where only the workstation libraries are present, it is not necessary to use the -w
option.
The following listing shows an example of the buildclient(1) command line on a native node.
Listing 2-1 buildclient Command Line
TUXDIR=/var/opt/tuxedo CC=ncc; export TUXDIR CC
buildclient -w -o wsclt -f wsclt.c -f "userlib1.a userlib2.a"
The -o
option provides a name for your output file. Input files are specified with the -f
firstfiles
option to indicate that they are link-edited before system libraries. As indicated in the example, you must define the TUXDIR
environment variable to ensure that the buildclient
command can locate system libraries. CC
defaults to cc
but can be set to another compiler, as shown in the example.
in BEA Tuxedo Command Reference
wud
and wud32
are BEA Tuxedo system-supplied driver programs provided for workstations. These driver programs are based on the standard BEA Tuxedo client programs, ud
and ud32
, that have been built using the workstation libraries.
Use wud(1)
to send FML
buffers to BEA Tuxedo system servers. Use wud32
with fielded FML32 buffers of type FBFR32
.
If wud
is run in a security application, it requires an application password to access the application. If standard input is from a terminal, wud
prompts the user for an application password. If you are running the client program from a script, which is a common occurrence with wud
, the password is retrieved from the environment variable APP_PW
. If this environment variable is not specified and an application password is required, then wud
fails.
Do not confuse the APP_PW
environment variable with the similar configuration file parameter, SECURITY
, for which the value APP_PW
enables the security feature.
After the client programs have been developed and tested, they can be moved to the workstations where they will be available to users.
The following table describes the directory structure on a Workstation client after you have installed the Workstation component of the BEA Tuxedo system.
Workstation clients make use of several environment variables. The following table shows the environment variables that are checked by tpinit(3c) or TPINITIALIZE(3cbl) when the Workstation client attempts to join the application. For details on setting these environment variables, see Defining Workstation Clients on page 13-1 in Setting Up a BEA Tuxedo Application.
Specifies the code-set encoding name that the workstation machine running BEA Tuxedo 8.1 or later includes in an allocated MBSTRING typed buffer. When a Workstation client allocates and sends an MBSTRING buffer, the code-set encoding name defined in When the workstation machine receives an MBSTRING buffer, and assuming another environment variable named
Note: |
|
Specifies whether the workstation machine running BEA Tuxedo 8.1 or later automatically converts the data in a received MBSTRING buffer to the encoding defined in Note: |
|
Specifies whether the workstation machine running BEA Tuxedo 8.1 or later caches Document Type Definition (DTD), XML schema, and entity files; specifically, whether the Apache Xerces-C++ parser running on the Workstation client caches the DTD and XML schema files when validation is required, or caches external entity files called out in the DTD. By default, the caching is turned on ( |
|
Applies only if Specifies the directory in which the workstation machine running BEA Tuxedo 8.1 or later caches DTD, schema, and entity files; specifically, where the Apache Xerces-C++ parser running on the Workstation client caches the DTD, XML schema, and entity files. The |
|
Specifies whether the workstation machine running BEA Tuxedo 7.1 or later is allowed to interoperate with pre-release 7.1 BEA Tuxedo applications. Setting the variable to |
|
Device name to be used to access the network. This variable is only required when the BEA Tuxedo system is using the TLI networking interface. |
|
Name of a file containing environment variable settings to be set in the client's environment. |
|
The network address used by the Workstation client when connecting to the workstation listener or workstation handler. This variable, along with the |
|
The range of TCP/IP ports to which a Workstation client process attempts to bind before making an outbound connection. The |
|
The network address of the workstation listener (WSL) process through which clients gain access to the application. Use the value specified in the application configuration file for the workstation listener to be called. If the value begins with the characters |
|
Maximum amount of core memory that ATMI functions use for buffering application replies before they are dumped to disk. Used by tpinit(3c) and TPINITIALIZE(3cbl). Replies obtained using tpgetrply(3c), TPGETRPLY(3cbl), and unsolicited messages are buffered in this area. When this area is filled with one or more messages, the overflow is written to a disk file. The system default limit is 256,000 bytes. Whether you use |
|
Workstation type. Used within tpinit(3c) and TPINITIALIZE(3cbl) when invoked by a Workstation client to negotiate encode/decode responsibilities with the native site. If you do not specify |
Other environment variables may be needed by Workstation clients on a UNIX workstation depending on the BEA Tuxedo system features being used. Reference page compilation(5) in BEA Tuxedo File Formats, Data Descriptions, MIBs, and System Processes Reference explains which variables are needed under what circumstances.
If you have created an environment file, it is read when tpinit(3c) or TPINITIALIZE(3cbl) is called. The following listing shows a sample file that could be used for two different applications.
TUXDIR=/opt/tuxedo
[application1]
;this is a comment
/* this is a comment */
#this is a comment
//this is a comment
set FIELDTBLS=app1_flds
set FLDTBLDIR=/opt/app1/udataobj
[application2]
FIELDTBLS=app2_flds
FLDTBLDIR=/opt/app2/udataobj
The format of the file is as follows:
variable=value
orset variable=value
where variable
must begin with an alphabetic or underscore character and contain only alphanumeric or underscore characters, and value
may contain any character except newline.
value
, strings of the form ${env
} are expanded using variables already in the environment. Forward referencing is not supported and if a value is not set, the variable is replaced with the empty string. Backslash (\) may be used to escape the dollar sign and itself. All other shell quoting and escape mechanisms are ignored and the expanded value
is placed into the environment.[
label
]
where label
is the name of the section and follows the same rules for variable above. The label is silently truncated if longer than 31 characters.
[]
also indicates the global section. Other variables are put into the environment only if the label matches the application label specified for the application.When you call the tuxreadenv(3c) function, it reads the environment file and adds the environment variables to the environment for the entire process, independent of platform. These variables are available using tuxgetenv(3c) and can be reset using tuxputenv(3c).
void tuxreadenv(char *
file
, char *label
)
If file
is NULL, then a default filename is used. The default filenames for various platforms are as follows:
If the value of label
is NULL, then only variables in the global section are put into the environment. For other values of label
, the global section variables plus any variables in a section matching the label
are put into the environment.
An error message is printed to the userlog under the following conditions:
Each time tpinit(3c)is called (either explicitly or implicitly by calling another ATMI function), tuxreadenv(3c) is called automatically in Workstation clients. If WSENVFILE
is set in the environment, then it designates the environment file; otherwise, NULL is passed to tuxreadenv()
for the filename so that the default file is used. If WSAPP
is set in the environment, then it is to be used as the section label in the environment file; otherwise, NULL is passed to tuxreadenv()
for the label name. Application clients may also call tuxreadenv()
explicitly.
The environment is implemented and available in different ways on different platforms. A uniform interface to the environment is provided via the existing tuxgetenv(3c) and tuxputenv(3c) functions. These functions provide access to the following:
WSENVFILE
file for the specified WSAPP
label (or the defaults if not specified)
To join a BEA Tuxedo application, a multithreaded Workstation client must always call tpinit()
with the TPMULTICONTEXTS
flag set, even if the client is running in single-context mode.
![]() ![]() |
![]() |
![]() |