skip to main content
Using the Driver : Connection Pool Manager : How Connection Pooling Works : The DataDirect Connection Pool Manager

Try DataDirect Drivers Now
The DataDirect Connection Pool Manager
Connection pooling is performed in the background and does not affect how an application is coded. To use connection pooling, an application must use a DataSource object (an object implementing the DataSource interface) to obtain a connection instead of using the DriverManager class. A DataSource object registers with a JNDI naming service. Once a DataSource object is registered, the application retrieves it from the JNDI naming service in the standard way.
Connection pool implementations, such as the DataDirect Connection Pool Manager, use objects that implement the javax.sql.ConnectionPoolDataSource interface to create the connections managed in a connection pool. All Progress DataDirect data source objects implement the ConnectionPoolDataSource interface.
The DataDirect Connection Pool Manager creates database connections, referred to as PooledConnections, by using the getPooledConnection() method of the ConnectionPoolDataSource interface. Then, the Pool Manager registers itself as a listener to the PooledConnection. When a client application requests a connection, the Pool Manager assigns an available connection. If a connection is unavailable, the Pool Manager establishes a new connection and assigns it to that application.
When the application closes the connection, the driver uses the ConnectionEventListener interface to notify the Pool Manager that the connection is free and available for reuse. The driver also uses the ConnectionEventListener interface to notify the Pool Manager when a connection is corrupted so that the Pool Manager can remove that connection from the pool.