How does connection pooling work and why do I sometimes see only 1 DB connection ?
Last Updated October 02, 2014
How does Connection pooling work and why do I sometimes see only one database connection despite users working in parallel within the Symantec DLP UI ?
The purpose of using connection pools is to avoid multiple connections going to a DB. It is very costly to establish the connections and would create a performance problem. By using connection pools, the JDBC driver opens a connection and creates a connection pool that will be used within the Vontu manager framework.
Pooled connections--a pooled connection instance represents a single physical connection to a database, remaining open during use by a series of logical connection instances.
A logical connection instance is a simple connection instance (such as a standard Connection instance or an OracleConnection instance) returned by a pooled connection instance. Each logical connection instance acts as a temporary handle to the physical connection represented by the pooled connection instance.
It is at the discretion of the driver how much concurrency it allows and how many connections it would spawn to the DB. In most cases the JDBC drivers are using it in a dynamic fashion and if the open connection is unable to handle the concurrent threads it won’t spawn a new connection.
In other words, In general the connections to the DB are handled by the actual JDBC driver. If there is a need for multiple connections to be open, the driver would establish them.
The drivers create a number of different threads, but only on an as-needed basis. They do not create the threads unless your code makes use of the feature that depends on the thread. All of these threads are daemon threads.
Which means , unless required or explicitly created within your code, the JDBC driver will create initially only one connection.
Imported Document ID: TECH221654
Subscribing will provide email updates when this Article is updated. Login is required to Subscribe