|
|
This topic includes the following sections:
Before you begin, you should read Introducing Transactions. In addition, for container-managed transaction demarcation in EJB applications, you can configure the transaction timeout setting, as described in Setting Transaction Timeouts.
This topic includes the following sections:
Modifying the UBBCONFIG File to Accommodate Transactions
To accommodate transactions, you must modify the RESOURCES
, MACHINES
, GROUPS
, and the INTERFACES
or SERVICES
sections of the application's UBBCONFIG
file in the following ways:
Summary of Steps
For instructions about modifying these sections in the UBBCONFIG
, see "Creating a Configuration File" in the Administration Guide.
Table 11-1 provides a description of transaction-related parameters in the RESOURCES
section of the configuration file.
Step 1: Specify Application-Wide Transactions in the RESOURCES Section
This section discusses creating a transaction log (TLOG
), which refers to a log in which information on transactions is kept until the transaction is completed.
The Universal Device List (UDL) is like a map of the BEA TUXEDO file system. The UDL gets loaded into shared memory when an application is booted. To create an entry in the UDL for the TLOG
device, create the UDL on each machine using global transactions. If the TLOGDEVICE
is mirrored between two machines, it is unnecessary to do this on the paired machine. The Bulletin Board Liaison (BBL) then initializes and opens the TLOG
during the boot process.
To create the UDL, enter a command using the following format, before the application has been booted:
tmadmin -c crdl -z
config
-b
blocks
where
Step 2: Create a Transaction Log (TLOG)
Creating the UDL
Note: In general, the value that you supply for blocks should not be less than the value for TLOGSIZE . For example, if TLOGSIZE is specified as 200 blocks, specifying -b 500 would not cause a degradation.
For more information about storing the TLOG , see the Installation Guide.
You can define a global transaction log (TLOG ) using several parameters in the MACHINES section of the UBBCONFIG file. You must manually create the device list entry for the TLOGDEVICE on each machine where a TLOG is needed. You can do this either before or after TUXCONFIG has been loaded, but it must be done before the system is booted.
Note: If you are not using transactions, the TLOG parameters are not required.
Table 11-2 provides a description of transaction-related parameters in the MACHINES section of the configuration file.
This section applies to the BEA TUXEDO system only.
You can create the Domains transaction log before starting the Domains gateway group by using the following command:
dmadmin(1) crdmlog (crdlog) -d local_domain_name Create the Domains transaction log for the named local domain on the current machine (the machine on which dmadmin
is running). The command uses the parameters specified in the DMCONFIG
file. This command fails if the named local domain is active on the current machine or if the log already exists. If the transaction log has not been created, the Domains gateway group creates the log when it starts up.
Additions to the GROUPS
section fall into two categories:
Creating the Domains Transaction Log (BEA TUXEDO Servers)
Step 3: Define Each Resource Manager (RM) and the Transaction Manager Server in the GROUPS Section
(the minimum is 2, the maximum is 10, and the default is 3).
A null transactional manager server does not communicate with any Resource Manager. It is used to exercise an application's use of the transactional primitives before actually testing the application in a recoverable, real environment. This server is named TMS and it simply begins, commits, or terminates without talking to any Resource Manager.
The following sample GROUPS
section derives from the bankapp
banking application:
BANKB1 GRPNO=1 TMSNAME=TMS_SQL TMSCOUNT=2 Table 11-3 describes the transaction values specified in this sample GROUPS section.
Sample GROUPS Section
OPENINFO="TUXEDO/SQL:<APPDIR>/bankdl1:bankdb:readwrite"
Transaction Value |
Meaning |
---|---|
Table 11-4 lists the characteristics of the TMSNAME, TMSCOUNT, OPENINFO, and CLOSEINFO parameters.
Characteristics of the TMSNAME, TMSCOUNT, OPENINFO, and CLOSEINFO Parameters
To enable an interface to begin a transaction, you change different sections in the UBBCONFIG
file, depending on whether you are configuring a WLE CORBA server or BEA TUXEDO server:
Step 4: Enable an Interface to Begin a Transaction
The INTERFACES
section in the UBBCONFIG
file supports WLE CORBA interfaces:
Changing the INTERFACES Section (WLE CORBA Servers)
Note: To work properly, this feature depends on collaboration between the system designer and the administrator. If the administrator sets this value to Y without prior knowledge of the transaction policy defined by the developer in the interface's ICF or XML file, the actual run time effect of the parameter might be unknown.
(231 - 1, or about 70 years). A value of zero implies there is no timeout for the transaction. (The default is 30
seconds.)
Note: For EJB and RMI applications, the AUTOTRAN and TRANTIME settings are ignored.
Table 11-5 describes the characteristics of the AUTOTRAN, TRANTIME, and FACTORYROUTING parameters.
The following are three transaction-related features in the SERVICES
section:
Changing the SERVICES Section (BEA TUXEDO Servers)
Note: Generally, clients are the best initiators of transactions because a service has the potential of participating in a larger transaction.
Note: For EJB and RMI applications, the AUTOTRAN and TRANTIME settings are ignored.
Table 11-6 describes the characteristics of the AUTOTRAN, TRANTIME, and ROUTING parameters:
This topic includes the following sections:
Modifying the Domain Configuration File to Support Transactions (WLE Servers)
To enable transactions across domains, you need to set parameters in both the DM_LOCAL_DOMAINS
and the DM_REMOTE_SERVICES
sections of the Domains configuration file (DMCONFIG
). Entries in the DM_LOCAL_DOMAINS
section define local domain characteristics. Entries in the DM_REMOTE_SERVICES
section define information on services that are imported and that are available on remote domains.
The DM_LOCAL_DOMAINS
section of the Domains configuration file identifies local domains and their associated gateway groups. This section must have an entry for each gateway group (Local Domain). Each entry specifies the parameters required for the Domains gateway processes running in that group.
Table 11-7 provides a description of the five transaction-related parameters in this section: DMTLOGDEV
, DMTLOGNAME
, DMTLOGSIZE
, MAXRDTRAN
, and MAXTRAN
.
Characteristics of the DMTLOGDEV, DMTLOGNAME, DMTLOGSIZE, MAXRDTRAN, and MAXTRAN Parameters
The DM_REMOTE_SERVICES
section of the Domains configuration file identifies information on services imported and available on remote domains. Remote services are associated with a particular remote domain.
Table 11-8 describes the two transaction-related parameters in this section: AUTOTRAN
and TRANTIME
.
Note:
For EJB and RMI applications, these settings are ignored.
Characteristics of the AUTOTRAN and TRANTIME Parameters (WLE CORBA and TUXEDO Servers)
Parameter |
Characteristics |
---|---|
This topic includes the following sections:
Sample Distributed Application Using Transactions
The configuration file includes seven sections: RESOURCES
, MACHINES
, GROUPS
, NETWORK
, SERVERS
, SERVICES
, and ROUTING
.
Note:
Although this sample is a CORBA application, the principles apply to EJB applications as well, except that the ROUTING
section is not used in EJB applications, nor are the TRANTIME
and AUTOTRAN
parameters in the INTERFACES
section.
The RESOURCES
section shown in Listing 11-1 specifies the following parameters:
RESOURCES Section
Listing 11-1 Sample RESOURCES Section
*RESOURCES
#
IPCKEY 99999
UID 1
GID 0
PERM 0660
MAXACCESSERS 25
MAXSERVERS 25
MAXSERVICES 40
MAXGTT 20
MASTER SITE3, SITE1
SCANUNIT 10
SANITYSCAN 12
BBLQUERY 180
BLOCKTIME 30
DBBLWAIT 6
OPTIONS LAN, MIGRATE
MODEL MP
LDBAL Y
The MACHINES
section shown in Listing 11-2 specifies the following parameters:
MACHINES Section
Listing 11-2 Sample MACHINES Section
*MACHINES
Gisela LMID=SITE1
TUXDIR="/usr/tuxedo"
APPDIR="/usr/home"
ENVFILE="/usr/home/ENVFILE"
TLOGDEVICE="/usr/home/TLOG"
TLOGNAME=TLOG
TUXCONFIG="/usr/home/tuxconfig"
TYPE="3B600"
romeo LMID=SITE2
TUXDIR="/usr/tuxedo"
APPDIR="/usr/home"
ENVFILE="/usr/home/ENVFILE"
TLOGDEVICE="/usr/home/TLOG"
TLOGNAME=TLOG
TUXCONFIG="/usr/home/tuxconfig"
TYPE="SEQUENT"
juliet LMID=SITE3
TUXDIR="/usr/tuxedo"
APPDIR='/usr/home"
ENVFILE="/usr/home/ENVFILE"
TLOGDEVICE="/usr/home/TLOG"
TLOGNAME=TLOG
TUXCONFIG="/usr/home/tuxconfig"
TYPE="AMDAHL"
The GROUPS
and NETWORK
sections shown in Listing 11-3 specify the following parameters:
GROUPS and NETWORK Sections
Listing 11-3 Sample GROUPS and NETWORK Sections
*GROUPS
DEFAULT: TMSNAME=TMS_SQL TMSCOUNT=2
BANKB1 LMID=SITE1 GRPNO=1
OPENINFO="TUXEDO/SQL:/usr/home/bankdl1:bankdb:readwrite"
BANKB2 LMID=SITE2 GRPNO=2
OPENINFO="TUXEDO/SQL:/usr/home/bankdl2:bankdb:readwrite"
BANKB3 LMID=SITE3 GRPNO=3
OPENINFO="TUXEDO/SQL:/usr/home/bankdl3:bankdb:readwrite"
*NETWORK
SITE1 NADDR="0X0002ab117B2D4359"
BRIDGE="/dev/tcp"
NLSADDR="0X0002ab127B2D4359"
SITE2 NADDR="0X0002ab117B2D4360"
BRIDGE="/dev/tcp"
NLSADDR="0X0002ab127B2D4360"
SITE3 NADDR="0X0002ab117B2D4361"
BRIDGE="/dev/tcp"
NLSADDR="0X0002ab127B2D4361"
The SERVERS
, SERVICES
, and ROUTING
sections shown in Listing 11-4 specify the following parameters:
SERVERS, SERVICES, and ROUTING Sections
Note: The ROUTING section is not used in EJB applications.
Listing 11-4 Sample SERVERS , SERVICES , and ROUTING Sections
*SERVERS
DEFAULT: RESTART=Y MAXGEN=5 REPLYQ=N CLOPT="-A"
TLR SRVGRP=BANKB1 SRVID=1 CLOPT="-A -- -T 100"
TLR SRVGRP=BANKB2 SRVID=3 CLOPT="-A -- -T 400"
TLR SRVGRP=BANKB3 SRVID=4 CLOPT="-A -- -T 700"
XFER SRVGRP=BANKB1 SRVID=5 REPLYQ=Y
XFER SRVGRP=BANKB2 SRVID=6 REPLYQ=Y
XFER SRVGRP=BANKB3 SRVID=7 REPLYQ=Y
*SERVICES
DEFAULT: AUTOTRAN=N
WITHDRAW ROUTING=ACCOUNT_ID
DEPOSIT ROUTING=ACCOUNT_ID
TRANSFER ROUTING=ACCOUNT_ID
INQUIRY ROUTING=ACCOUNT_ID
*ROUTING
ACCOUNT_ID FIELD=ACCOUNT_ID BUFTYPE="FML"
RANGES="MON - 9999:*,
10000 - 39999:BANKB1
40000 - 69999:BANKB2
70000 - 100000:BANKB3
""
|
Copyright © 1999 BEA Systems, Inc. All rights reserved.
|