Network Deployment (Distributed operating systems), v8.0 > Applications > Data access resources > Data concepts > Connection management architecture


Connection pooling

Use connection pools helps to both alleviate connection management overhead and decrease development tasks for data access.

Each time an application attempts to access a backend store (such as a database), it requires resources to create, maintain, and release a connection to that datastore.

To mitigate the strain this process can place on overall application resources, the Application Server enables administrators to establish a pool of backend connections that applications can share on an application server. Connection pooling spreads the connection overhead across several user requests, thereby conserving application resources for future requests.

WAS v8 supports JDBC 4.0 APIs for connection pooling and connection reuse. The connection pool is used to direct JDBC calls within the application, as well as for enterprise beans using the database.


Benefits of connection pooling

Connection pooling can improve the response time of any application that requires connections, especially Web-based applications. When a user makes a request over the web to a resource, the resource accesses a data source. Because users connect and disconnect frequently with applications on the Internet, the application requests for data access can surge to considerable volume. Consequently, the total datastore overhead quickly becomes high for Web-based applications, and performance deteriorates. When connection pooling capabilities are used, however, web applications can realize performance improvements of up to 20 times the normal results.

With connection pooling, most user requests do not incur the overhead of creating a new connection because the data source can locate and use an existing connection from the pool of connections. When the request is satisfied and the response is returned to the user, the resource returns the connection to the connection pool for reuse. The overhead of a disconnection is avoided. Each user request incurs a fraction of the cost for connecting or disconnecting. After the initial resources are used to produce the connections in the pool, additional overhead is insignificant because the existing connections are reused.


When to use connection pooling

Use connection pooling in an application that meets any of the following criteria:



How connections are pooled together

When you configure a unique data source or connection factory, give it a unique JNDI name. This JNDI name, along with its configuration information, is used to create the connection pool. A separate connection pool exists for each configured data source or connection factory.

Furthermore, the application server creates a separate instance of the connection pool in each application server that uses the data source or connection factory. For example:

Consider how this behavior potentially impacts the number of connections that your backend resource can support. See the topic, Connection pool settings, for more information.

Other considerations for determining the maximum connections setting:

It is also important to note that when using connection sharing, it is only possible to share connections obtained from the same connection pool.


Related


Connection and connection pool statistics
Data sources
Unshareable and shareable connections
Transaction type and connection behavior
Tune connection pools
Configure connection factories for resource adapters within applications
Configure Java EE Connector connection factories in the administrative console
Change connection pool settings with wsadmin.sh


Related


Tune the application serving environment Concept topic

+

Search Tips   |   Advanced Search