GatewayConnectionPool Class

CICS Transaction Gateway V10.1.0.0
Represents a pool of connections to a Gateway daemon.
Inheritance Hierarchy

SystemObject
  IBM.CTGGatewayConnectionPool
    IBM.CTGSslGatewayConnectionPool

Namespace:  IBM.CTG
Assembly:  IBM.CTG.Client (in IBM.CTG.Client.dll) Version: 10.1.0.0 (10.1.0.0)
Syntax

public class GatewayConnectionPool : IDisposable

The GatewayConnectionPool type exposes the following members.

Constructors

  NameDescription
Public methodGatewayConnectionPool(String, Int32)
Creates a new connection pool with default connection pool properties.
Public methodGatewayConnectionPool(String, Int32, ConnectionPoolProperties)
Creates a new connection pool with the specified connection pool properties.
Top
Properties

  NameDescription
Public propertyAgedTimeout
Gets the maximum time that connections can remain open in the connection pool.
Public propertyApplid
Gets the client APPLID used for transaction tracking by connections in this pool.
Public propertyApplidQualifier
Gets the client APPLID qualifier used for transaction tracking by connections in this pool.
Public propertyAvailableCount
Gets the number of connections in this connection pool that are available to be acquired.
Public propertyConnectionCount
Gets the total number of connections in this connection pool.
Public propertyHostName
Gets the host name of the Gateway daemon that connections in this pool are connected to.
Public propertyIdleTimeout
Gets the maximum time that connections can remain idle in the connection pool.
Public propertyMaxConnections
Gets the maximum number of connections in this connection pool.
Public propertyMinConnections
Gets the minimum number of connections in this connection pool.
Public propertyPort
Gets the remote TCP/IP port that connections in this pool are connected to.
Top
Methods

  NameDescription
Public methodClose
Closes all connections in this connection pool.
Public methodClose(Int32)
Closes all connections in this connection pool, optionally waiting for allocated connections to be returned to the pool.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetConnection
Acquires a connection from the connection pool.
Public methodGetConnection(Int32)
Acquires a connection from the connection pool, with a specified timeout period.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

A connection pool contains a number of open GatewayConnection instances which can be acquired for use and then later returned to the pool after user. Pooled connections can be used in exactly the same way as non-pooled connections, the only difference being the way the connection is obtained. To create a pool of Secure Sockets Layer (SSL) connections, use SslGatewayConnectionPool. A connection pool is created by passing a ConnectionPoolProperties object to the constructor. The properties object contains parameters that control the number of connections in the connection pool and the behaviour of the connection pool. By default, the minimum number of connections is 1 and the maximum number of connections is unlimited (Int32.MaxValue). Once the connection pool is created, connections can be acquired using GetConnection or GetConnection(Int32), which return an available connection if there is one in the connection pool. If there are no available connections and the total number of connections is less than the maximum pool size, then a new connection is established. Connections in the pool remain open until either the pool is closed, the connected Gateway daemon is shut down, or the connection is dropped for any reason. A connection pool can be closed by invoking Close or Close(Int32). The first of these overloads immediately closes all connections in the pool, whether they are in use or not. The second method allows a timeout period to be specified, during which currently allocated connections from the pool can continue to be used. Once all connections are returned to the pool, or the timeout period expires, all connections are closed.
Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
See Also

Reference