Configuring Live Connection

Live Connection manages database and Java application connections to improve performance for Net.Data on the Windows NT, OS/2, AIX, and Sun Solaris operating systems. Through the use of a Connection Manager and cliettes, processes that maintain open connections, Live Connection eliminates the start up overhead of connecting to a database or starting a Java Virtual Machine.

Live Connection uses a configuration file, dtwcm.cnf, to determine what cliettes need to be started. It contains administration information and definitions for each of the cliettes used with Live Connection. See Managing Connections to learn more about Live Connection.

The sample configuration file shown in Figure 6 contains the following types of information:

Figure 6. The Live Connection configuration file




 1  CONNECTION_MANAGER{
 2  MAIN_PORT=7100	
 3  }
 4
 5  CLIETTE DTW_SQL:CELDIAL{
 6  MIN_PROCESS=1		 
 7  MAX_PROCESS=5		 
 8  EXEC_NAME=./dtwcdb2
 9  DATABASE=CELDIAL   
10  LOGIN=marshall		 
11  PASSWORD=stlpwd		 
12  }
13
14  CLIETTE DTW_JAVAPPS{	
15  MIN_PROCESS=1	      
16  MAX_PROCESS=5		   
17  EXEC_NAME=./javaapp	
18  }



  • Lines 1 - 3 are required for the configuration file and define unique port
    numbers used with Live Connection.
  • Lines 5 - 12 define all database cliettes, identifying the cliette name,
    the number of processes to be run, database name,, and the cliette exec
    file. You can include additional information, such as a user ID and
    password for connecting to a DB2 database.
  • Lines 14 - 18 define all cliettes for Java applications, identifying the
    cliette name, the number of processes to be run, unique port numbers, and the
    cliette exec file.



Before you begin: Read the hints and tips section following these steps before customizing the Live Connection configuration file.

Configuring Live Connection ports:

The value you choose for MAIN_PORT is the port number that will be used first. The port numbers that live connection could use can be calculated using the setting of MAIN_PORT and each cliette's MAX_PROCESSES. When loaded, live connection allocates ports starting at the number specified in MAIN_PORT and incrementally until the cumulative MIN_PROCESSES are reached. As needed, it will then load ports until the MAX_PROCESSES are reached. The maximum number of ports used are the sum of the MAX_PROCESSES settings.

For example, in the configuration in Figure 6, the port numbers allocated would be 7100, 7101, and 7102, and then up to 7110 as needed.

Important:

Configuring database cliettes:

  1. Type the cliette environment statement.

    CLIETTE type:db_name
    

    Parameters:

    type
    The name that associates a language environment with a cliette. See *** for a list of valid types.

    db_name
    The database cliette name, which is often the same as the database with which the cliette is associated, such as MYDBASE; however the db_name can also be another name. db_name is optional when using the Oracle language environment.
  2. Determine values for MIN_PROCESS and MAX_PROCESS. MIN_PROCESS specifies the number of processes to be started when the Connection Manager is started. Afterwards, if additional simultaneous requests arrive, the Connection Manager starts more cliettes, adding one as needed, until the value specified for MAX_PROCESS is reached.

    Type the MIN_PROCESS and MAX_PROCESS statements:

    MIN_PROCESS=min_num
    MAX_PROCESS=max_num
    

    Parameters:

    min_num
    The number of cliette processes to be started when the Connection Manager is started. You must have enough available unique port numbers for this number of cliettes.

    max_num
    The maximum number of cliettes that can be run simultaneously. You must have enough available unique port numbers for this number of cliettes.
  3. Specify the name of the cliette executable file. This file name is specified as:
    EXEC_NAME=./dtwcdbtypeid
    

    Where dbtypeid is the database type identifier. Refer to Table 6 for valid executable file names:

    Table 6. Cliette exec file names
    Cliette Description Cliette Type Names Platform Availability
    UNIX Windows NT or OS/2 AIX NT OS/2 HP SUN PTX
    DB2 process cliette DTW_SQL dtwcdb2 dtwcdb2.exe Y Y Y Y Y N
    ODBC process cliette DTW_ODBC dtwcodbc dtwcodbc.exe Y Y N N N N
    Oracle process cliette DTW_ORA dtwcora dtwcora.exe Y Y N N N N

  4. Specify the name of the database with which the cliette is associated:

    DATABASE=db_name
    

    Where db_name is the name of the database with which the cliette is associated; for example, MYDBASE.

  5. Optional: Change the default values for the LOGIN and PASSWORD variables to *USE_DEFAULT so that Net.Data uses the same user ID that started the Connection Manager to connect to the DB2 database. By specifying these default values, you avoid placing this information in the configuration file. For example, replace lines 14 and 15, in the sample configuration file in Figure 6 with these lines:
    LOGIN=*USE_DEFAULT
    PASSWORD=*USE_DEFAULT
    
    Tip: If you define multiple cliette entries in the configuration file, you can specify various database login and passwords for a particular database.

Configuring Java application cliettes:

  1. Type the cliette environment statement:

    CLIETTE DTW_JAVAPPS
    
  2. Determine values for MIN_PROCESS and MAX_PROCESS. MIN_PROCESS specifies the number of processes that are to be started when the Connection Manager is started. Afterwards, if simultaneous requests arrive, the Connection Manager starts more cliettes, adding one as needed, until the value specified for MAX_PROCESS is reached.

    Type the MIN_PROCESS and MAX_PROCESS statements.

    MIN_PROCESS=min_num
    MAX_PROCESS=max_num
    

    Parameters:

    min_num
    The number of cliette processes started when the Connection Manager is started. You must have enough available unique port numbers for this number of cliettes.

    max_num
    The maximum number of additional cliettes that can be run simultaneously. You must have enough available unique port numbers for this number of cliettes.

Hints and tips for configuring Live Connection:

If you are using CGI, and want only some databases to use Live Connection, simply list the databases you want in the configuration file. When Net.Data is processing a Net.Data macro and encounters an SQL function, it asks the Connection Manager for a specific cliette. If the Connection Manager does not have that type of cliette, it responds with a NO_CLIETTE_AVAIL message. Net.Data processes the request with a DLL version instead.

Confiring the Connection Manager service to start automatically:

On Windows NT, you can specify to have Connection Manager start as an Windows NT service, instead of from the command line. Running Connection Manager as an Windows NT service allows Connection Manager to be automatically started each time the machine is started.

Important: Start Connection Manager from the command line before setting it up to start automatically to ensure that the Live Connection configuration file is correct.


[ Top of Page | Previous Page | Next Page | Index ]