Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 1 Preparing Tuxedo : Preparing Tuxedo

Preparing Tuxedo
Before configuring the adapter, you must complete the tasks in this section to allow the adapter to access Tuxedo services. Set the required environment variables, boot the Tuxedo services and ensure that they are running successfully. This section explains how to prepare Tuxedo services to interact with the adapter. You need to perform the following tasks to prepare Tuxedo:
 
Task A Set Environment Variables
Set the following environment variables:
Set the following environment variables on the machine where Tuxedo is installed and where the services are to be booted.
The IP address of the WSL (Workstation Listener) that the client will contact, along with any free port number. This value must be reflected in the ubbconfig file. This variable need not be set for the adapter in the native client mode. For example, WSNADDR=//192.168.213.63:4020 (//IP address:Port number)
Directory where the Tuxedo service executable files are located. For example, APPDIR=TIBCO_HOME\adapter\adtuxedo\veriosn_number\examples\EventBased\Employee
The environment variable used to find executables. For example, %TUXDIR%\bin;%APPDIR%;%PATH%;%TUX_ADAPTER_HOME%\hotfix\lib;%TUX_ADAPTER_HOME%\lib;%TIBCO_RV_HOME%\bin
The name of the Tuxedo  configuration file to be generated along with the location. The value specified cannot exceed 64 characters for versions of Tuxedo 8.0 or lower whereas it can be up to 256 characters for Tuxedo 8.1 or higher. Please ensure these limits are not exceeded depending on the version of Tuxedo that is being used. For example, TUXCONFIG: %APPDIR%\tuxconfig.
The queue device. The name and location where the ’que’ configuration file will be generated. The ’que ’file will contain queue related details like queue manager, list of queues and other parameters like maximum size. Set to %APPDIR%\QUE.
Note that the value set for the QIPCKEY variable must be different from that specified in the ubbconfig file *RESOURCES IPCKEY parameter.
Set the following environment variables on the machine where the adapter is installed.
The directory where the adapter executable file is located. For example, APPDIR=TIBCO_HOME\adapter\adtuxedo\veriosn_number\bin.
The IP address of the WSL (Workstation Listener), along with the port number. This value must correspond to that set in the server machine. For example, WSNADDR=//192.168.213.63:4020 (//IP address:Port number).
WSNADDR need not be set for a Native client. TUXCONFIG needs to be set instead.
Task B Edit the ubbconfig File
Edit the ubbconfig file to reflect the same values for the environment variables set on the machine with the Tuxedo client and server installation. The ubbconfig file contains default values as bracketed items. Change the default values as per your requirements.
Ensure that the values specified for the environment variables are reflected in the ubbconfig file. The settings to be modified are as follows:
TUXDIR—Tuxedo installation directory.
APPDIR—Directory where the Tuxedo service executable files are located.
TUXCONFIG—The name of the Tuxedo configuration file to be generated along with the location. The value specified cannot exceed 64 characters, so ensure that your directory structure is such that the path and file name together are 64 characters or less.
ULOGPFX - The location of Application Log File.
MAXWSCLIENTS—The maximum number of clients that can connect to Tuxedo. The default is set to 0 (zero). You must set this to 1 or higher in order to boot the Tuxedo services successfully. The maximum number of clients that can be specified is 32767. This need not be set if it is a native client.
Ensure that MAXWSCLIENTS is set to 1 or higher.
CLOPT (modify the IP address to reflect the value specified for the WSNADDR environment variable). If the client that will connect to this server is to be used as a native client, this is not required to be set.
For a Publication service and Subscription service configuration, you also need to set the following:
SRVGRP (modify the directory to point to APPDIR)
For Event-based communication supported by the adapter Publication and Subscription services, the location of the EventBroker Repository has to be mentioned along with the -f option in CLOPT.
Task C Create Tuxedo Configuration Files
Convert the ubbconfig file into a Tuxedo configuration file. Once the Tuxedo configuration file has been generated, it will be placed in the path specified for the TUXCONFIG environment variable.
1.
tmloadcf -y ubbconfig file name
or
tmloadcf ubbconfig file name
(Answer "y" if it prompts you on whether it should proceed)
2.
TIBCO_HOME\adapter\adtuxedo\veriosn_number\examples\EventBased\Employee>tmadmin
 
A ">" prompt is displayed as shown in the sample below:
\
TIBCO_HOME\adapter\adtuxedo\veriosn_number\examples\EventBased\Employee>tmadmin
  tmadmin - Copyright (c) 1996-1999 BEA Systems, Inc
  Portions * Copyright 1986-1997 RSA Data Security,
  All Rights Reserved.
  Distributed under license by BEA Systems, Inc.
   >
     Tuxedo is a registered trademark.
3.
Create a transaction log (TLOG device), by going to the > prompt and typing echo, then type crdl -b 200 -z TIBCO_HOME\adapter\adtuxedo\veriosn_number\examples\EventBased\Employee\TLOG and press Enter as shown in the sample below:
 
   >echo
   Echo now on.
> crdl -b 200 -z TIBCO_HOME\adapter\adtuxedo\veriosn_number\examples\EventBased\Employee\TLOG
   device created on TIBCO_HOME\adapter\adtuxedo\veriosn_number\examples\EventBased\Employee\TLOG
step 2 and step 3 need to be followed if a database is being used. They can be ignored for the examples provided with the adapter.
If the adapter has to establish multiple connections with the Tuxedo server, you need to modify the default server settings.
The following settings control access to your applications:
You need to adjust these settings to ensure that the number of allowable client connections is properly configured.
WSL SRVGRP=Group SRVID=ID
CLOPT="-A -- -n //IP address:Port number
The -m and -M determine how many WSH processes will be started. If you want to allow more connections, you should increase the -M value. Depending on the number of connections to be increased, you have to accordingly increase the MAXWSCLIENTS value. The -x value is the multiplexing factor. This determines how many connections can be handed by one WSH process.
Task D Modify the Server Program to Invoke the Agent Method
Complete this task only if you are configuring an adapter with a Request-Response Invocation service, or a Publication service that uses the adapter agent.
1.
2.
Make a copy of the adapteragent.h file present in the TIBCO_HOME\adapter\adtuxedo\veriosn_number\include directory.
3.
4.
#include adapteragent.h,if the service is based on TIBCO Rendezvous.
#include adapteragentJms.h,if the service is based on TIBCO EMS.
When the buffer type is FML32, the Adapter Agent wraps the FML32 buffer in a CArray buffer and sends it to the adapter. You should allocate sufficient memory for the reply FML32 buffer in the calling Tuxedo service before calling any of the adapter agent methods that are mentioned above.
Refer to the agent based publication service and request-response invocation service Examples from TIBCO ActiveMatrix Adapter for Tuxedo Examples.
Task E Create Executable Files
To create executables for Tuxedo client and server programs using the buildclient and buildserver utilities:
1.
buildclient -o client executable file name -f client .c file name
2.
buildserver -o server executable file name -f server .c file name -s service name
Request-Response invocation services and Agent-based Publication services. The service should be built with the agent.lib, libagent.so or libagent.sl file depending on the platform.
buildserver -o server executable file name -f server .c file name -s service name
-l the home directory of TIBCO ActiveMatrix Adapter for Tuxedo\lib\agent library file name
(where the Rendezvous Adapter Agent library file name is agent.lib on Microsoft Windows, libagent.so on Solaris, AIX, HP-UX IA, or libagent.sl on HP-UX PA_RISC)
Task F Boot Tuxedo Services
Use the following steps to start Tuxedo services and verify that they are active.
1.
tmboot -y
If the above steps are applied to the EMPLOYEE example, the following message displays on the screen indicating that the Tuxedo services are being successfully booted:
 
   Booting all admin and server processes in    TIBCO_HOME\adapter\adtuxedo\veriosn_number\examples\EventBased\Employee\tuxc     onfig
   INFO: BEA Tuxedo, Version 8.0
   INFO: Serial #: 650522264137-764259295626, Expiration    2003-06-03, Maxusers 1000
   INFO: Licensed to: BEA Evaluation Customer
   Booting admin processes ...
   exec BBL -A :
           process id=545 ... Started.
   Booting server processes ...
   exec TMUSREVT -e tmusrevt.out -o tmusrevt.out -A -- -f    TIBCO_HOME\adapter\adtuxedo\veriosn_number\examples\EventBased\Employee\tmus     revt.dat :
           process id=769 ... Started.
   exec TLR -A :
            process id=434 ... Started.
   5 processes started.
2.
tmadmin
A ’>’ prompt displays if the configuration is active as shown in the sample below.
 
   TIBCO_HOME\adapter\adtuxedo\veriosn_number\examples\EventBased\Employee>tmad    min
  tmadmin - Copyright (c) 1996-1999 BEA Systems, Inc
  Portions * Copyright 1986-1997 RSA Data Security,
  All Rights Reserved.
  Distributed under license by BEA Systems, Inc.
   >
     Tuxedo is a registered trademark.
If the configuration is not active, the following message displays:
 
   No bulletin board exists Entering boot mode
   >

Copyright © TIBCO Software Inc. All Rights Reserved