Scalable Database Server, HiRDB Version 8 UAP Development Guide
The multi-connection facility establishes multiple connections to the HiRDB server from one AP process in a HiRDB client. This facility can be used only when creating or executing a UAP in the HP-UX, Solaris, or Windows environment.
The multi-connection facility establishes independent individual connections. A separate server process is allocated to each connection, and the connections are processed as separate transactions. The AP process can, therefore, execute multiple SQL statements simultaneously. Because multiple connections can be established from one UAP, the number of UAPs to be executed can be reduced, and the overall memory requirement for UAPs can be reduced.
Because each connection is counted as a separate user, the maximum number of server connections becomes the maximum number of simultaneous connections rather than the maximum number of users.
The multi-connection facility has the following characteristics:
When the multi-connection facility is used in the X/Open XA interface environment, a UAP operating under a single transaction manager (such as OpenTP1) can use the XA interface to access multiple HiRDB systems. Because the UAP is using the XA interface, the UAP can synchronize and control processing among transactions that access multiple HiRDB systems.
For the open character string to be specified in the xa_open() function, specify the name of the file in which the environment variables (client environment definitions) were set. The xa_open() function establishes a connection to HiRDB according to those environment variables. You can select the destination to which an SQL statement is issued from among the connection destinations connected by the xa_open() function.
The multi-connection facility in the X/Open XA interface environment can be used only with the following client platforms:
Figures 4-54 through 4-58 show an overview of multi-connection facility processing.
Figure 4-54 Overview of multi-connection facility processing (when multithreading is not used)
Figure 4-55 Overview of multi-connection facility processing (when multithreading is used)
Figure 4-56 Overview of multi-connection facility processing (when a connection is shared by multiple threads)
Figure 4-57 Overview of multi-connection facility processing (when an AP uses an X/Open-compliant API in a single-thread OLTP system)
Figure 4-58 Overview of multi-connection facility processing (when an AP uses an X/Open-compliant API in a multi-thread OLTP system)
Figures 4-59 and 4-60 show coding examples of UAPs that use the multi-connection facility.
Figure 4-59 Coding example (C) of a UAP that uses the multi-connection facility
Figure 4-60 Coding example (COBOL) of a UAP that uses the multi-connection facility
Figures 4-61 and 4-62 show coding examples in which the multi-connection facility is used by UAPs that use an X/Open-compliant API under OLTP.
Figure 4-61 Coding example (C) in which the multi-connection facility is used by a UAP that uses an X/Open-compliant API under OLTP
Figure 4-62 Coding example (COBOL) in which the multi-connection facility is used by a UAP that uses an X/Open-compliant API under OLTP
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.