EM: Databases/SQL > Connection Pools
Description
Connection Pools consist of zero or more open connections. When an application asks the pool for a connection, the pool may give the application a brand new connection (such as when the pool is empty or does not have any free connections available), or it may return an existing connection. The application does not care what kind of connection it receives, the pool manages the creation and distribution of connections.
Some applications require connection pooling when connecting to third-party JDBC/ODBC databases. Common use cases include:
-
There is a limited number of licenses available on the third party database but you have a larger number of users that need to use the system.
-
The application opens and closes a large number of connections and the third party database has problems cleaning up the closed connections fast enough.
-
Opening a new connection to the third party database takes too much time for a particular application.
A connection pool is an interface that sits between the application and the JDBC or ODBC Driver that actually communicates with the database. This allows an application to use a connection pool without making any changes to the application or the user experience.
Location
EM Navigator →
Databases/SQL →
Connection Pools
Toolbar
| Button | Function |
|---|---|
|
Adds new pool, and accesses the Connection Pool editor. |
|
Removes/deletes the selected Connection Pool(s). |
|
Refreshes the list of Connection Pool(s). |
Connection Pools Main Pane
The
Connection Pools pane lists defined database connection pools, showing scope and current usage, while providing controls to create, remove, or refresh pools used by applications.
Connection Pools Main Pane Settings
Creating and Configuring a Connection Pool
Clicking the
icon on the
Connection Pools pane opens the Connection Pool configuration view, where users define a pool name, JDBC connection details, pool behavior limits, transaction settings, and validation options to control how database connections are created, managed, reused, and verified.
JDBC Connection Settings
JDBC Connection Settings defines JDBC driver class, connection URL, and optional properties required to establish authenticated, reliable connections between the application and target databases servers.
JDBC Connection Settings List
Pool Configuration
The Pool Configuration section defines connection pool behavior, including scope, limits, exhaustion handling, wait timing, idle management, eviction intervals, transaction settings, and commit behavior controlling database connection life-cycle and concurrency.
Pool Configuration Settings List
Validation
It defines connection validation behavior using a test query and execution timing options, ensuring pooled JDBC connections remain valid during borrowing, returning, or idle periods operations.
Validation Settings List
| Settings | Description |
|---|---|
| Validation Query | The SQL query that the pool should run when it needs to check the validity of a connection in the pool. |
| Test On Borrow |
|
| Test On Return |
|
| Test While Idle |
|
Opening a Connection in a Global Pool
To open a connection from a Global connection pool, use code similar to the following:
SQLOPEN(chan)"MyGlobalPool"
All connections will have the same connection properties and user credentials when using Global pools. If this is a security issue for the application, use User pools.
Opening a Connection in a User Pool
To open a connection from a User connection pool, use code similar to the following:
SQLOPEN(chan, MODE="user=admin, password=admin123")"MyUserPool"
Note: notice that the User pool requires a user name and password if the third party database requires them. Each connection will be validated using the user and password so that the application can control access to the various connections in the pool.