The DataDirect Connection Pool Manager
- Last Updated: June 5, 2018
- 1 minute read
- DataDirect Connectors
- JDBC
- Aha! 6.0
- Amazon Redshift 6.0
- Apache Cassandra 6.0
- Apache Hive 6.0
- Apache Spark SQL 6.0
- Atlassian Jira 6.0
- Autonomous REST Connector 6.0
- Cloudera Impala 5.1
- + 24
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.