Using 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.
About this task
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 overhead for a datastore can become high for Web-based
applications quickly, and performance deteriorates. When connection pooling
capabilities are used, however, Web applications can realize performance improvements
of up to 20 times the normal results.
Avoid trouble: Connection pooling is not
supported in an application client. The application client calls the
database directly and does not go through a data source. If you want
to use the getConnection() request from the application client, configure
the JDBC provider in the application client deployment descriptors,
using Rational
® Application Developer (RAD) or
an assembly tool. The connection is established between application
client and the database. Application clients do not have a connection
pool, but you can configure JDBC provider settings in the client deployment
descriptors.
gotcha