Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

16.8 Connection pooling function

Organization of this section
(1) About the connection pooling function
(2) How to use the function

(1) About the connection pooling function

The connection pooling function reduces the number of new connections by keeping reusable connections in effect.

When a UAP calls the Open method of the Connection object, HiRDB.NET Data Provider checks the connection pool for a reusable connection. If there is an available connection in the pool, HiRDB.NET Data Provider returns that connection to the calling program without opening a new connection. If there is no available connection in the pool, HiRDB.NET Data Provider opens a new connection. When a UAP calls the Close method of the Connection object, HiRDB.NET Data Provider does not actually close the connection. Instead, the next time the Open method is called, HiRDB.NET Data Provider reuses the connection kept in the connection pool without opening a new connection.

A connection is kept in the connection pool for a specified period of time. If the connection is not reused within that period, it is discarded from the pool.

Hint
If you make frequent use of the Open and Close methods of the Connection object, you might be able to significantly improve UAP performance and scalability by using connection pooling.

(2) How to use the function

You specify the following settings to use the connection pooling function:

When these settings have been specified, a connection in the pool that satisfies both the following conditions is reused: