Assembly: IBM.CTG.Client (in IBM.CTG.Client.dll) Version: 1.0.0.0
Syntax
C# |
---|
public class ConnectionPoolProperties |
Visual Basic |
---|
Public Class ConnectionPoolProperties |
Visual C++ |
---|
public ref class ConnectionPoolProperties |
Remarks
An instance of ConnectionPoolProperties can be specified when creating a new GatewayConnectionPool or SslGatewayConnectionPool in order to control the number of connections in the connection pool and the behaviour of the connection pool. A single ConnectionPoolProperties instance can be used to create multiple connection pools.
The MinConnections and MaxConnections properties set the minimum and maximum number of connections in the connection pool. When a connection pool is created, the minimum number of connections are established immediately. Additional connections are established and added to the pool each time GetConnection()()()() is invoked while all existing connections are in use and the maximum number of connections has not been reached. Connections are removed from the pool if an error occurs while in use. If this causes the number of connections in the pool to drop below the minimum number of connections, new connections are established and added to the pool until the minimum is reached. The default value for MinConnections is 1 and the default value for MaxConnections is unlimited (Int32.MaxValue).
The ConnectTimeout property sets maximum time, in seconds, to wait for connections in the pool to be established. A value of zero indicates no timeout. The default value is zero.
The IdleTimeout property sets the maximum time, in seconds, that connections in the pool can remain idle before they are automatically closed. If the number of connections in the connection pool is greater than MinConnections, any connections that have not been acquired for the specified number of seconds are closed. This property can be used to ensure that communication resources are released during periods of reduced activity. A value of zero indicates no timeout. The default value is zero.
The AgedTimeout property sets maximum time, in seconds, that connections in the pool can remain open before they are automatically closed. When deploying a high availability environment where work is balanced across multiple Gateway daemon instances, this property can be used to ensure that connections in the connection pool continue to be balanced after a failure has occurred. If this property is set, connections in the pool are periodically closed and then re-established so that they can be evenly distributed across all available Gateway daemon instances. A value of zero indicates no timeout. The default value is zero.
Transaction tracking for connections in the connection pool can be enabled by setting the Applid and ApplidQualifier properties. All connections in the connection pool share the same APPLID and APPLID qualifier.