Chapter 9. Accessing relational databases from WebSphere 373
7. Review the summary of your selections, and click Finish.
8. When the data source creation is complete, save the configuration, and synchronize the
changes with the nodes when using Network Deployment environment.
9. Test the new connection by selecting the new data source and clicking Test connection.
9.7 Configuring connection pooling properties
Performance of an application that connects to a database can be greatly affected by the
availability of connections to the database and how those connections affect the performance
of the database itself. There are no simple rules that tell you how to configure the connection
pool properties. Your configuration is highly dependent on application, network, and database
characteristics. You must coordinate the values that you specify in WebSphere closely with
the database administrator.
Remember to include all resources in capacity planning. If 10 applications all connect to a
database using separate connection pools of 10 maximum connections, this means that there
is a theoretical possibility of 100 concurrent connections to the database. Make sure that the
database server has sufficient memory and processing capacity to support this requirement.
Complete the following steps to access the connection pool properties:
1. Navigate to Resources JDBC Data sources, and click the data source name.
2. In the Additional Properties section, click Connection pool properties. The window
shown in Figure 9-24 opens.
Figure 9-24 Data source connection pool properties
374 WebSphere Application Server V8.5 Administration and Configuration Guide for the Full Profile
Specify the following information:
Connection Timeout
Specify the interval, in seconds, after which a connection request times out and a
ConnectionWaitTimeoutException is thrown. This action can occur when the pool is at
its maximum (Max Connections) and all of the connections are in use by other
applications for the duration of the wait. For example, if Connection Timeout is set to
300 and the maximum number of connections is reached, the Pool Manager waits for
300 seconds for an available physical connection. If a physical connection is not
available within this time, the Pool Manager throws a
ConnectionWaitTimeoutException.
Max Connections
Specify the maximum number of physical connections that can be created in this pool.
These connections are the physical connections to the database. After this number is
reached, no new physical connections are created and the requester waits until a
physical connection that is currently in use is returned to the pool or a
ConnectionWaitTimeoutException is thrown. For example, if Max Connections is set to
5, and there are five physical connections in use, the Pool Manager waits for the
amount of time specified in Connection Timeout for a physical connection to become
free. If, after that time, there are still no free connections, the Pool Manager throws a
ConnectionWaitTimeoutException to the application.
Min Connections
Specify the minimum number of physical connections to be maintained. Until this
number is reached, the pool maintenance thread does not discard any physical
connections. However, no attempt is made to bring the number of connections up to
this number. For example, if Min Connections is set to 3, and one physical connection
is created, that connection is not discarded by the Unused Timeout thread. By the
same token, the thread does not automatically create two additional physical
connections to reach the Min Connections setting.
Reap Time
Specify the interval, in seconds, between runs of the pool maintenance thread. For
example, if Reap Time is set to 60, the pool maintenance thread runs every 60
seconds. The Reap Time interval affects the accuracy of the Unused Timeout and
Aged Timeout settings. The smaller the interval you set, the greater the accuracy.
When the pool maintenance thread runs, it discards any connections that are unused
for longer than the time value specified in Unused Timeout, until it reaches the number
of connections specified in Min Connections. The pool maintenance thread also
discards any connections that remain active longer than the time value specified in
Aged Timeout.
Tip: If Connection Timeout is set to 0, the pool manager waits as long as necessary
until a connection is allocated.
Tip: Set Min Connections to zero (0) if the following conditions are true:
You have a firewall between the application server and database server.
Your systems are not busy 24x7.
Tip: If the pool maintenance thread is enabled, set the Reap Time value less than
the values of Unused Timeout and Aged Timeout.

Get WebSphere Application Server V8.5 Administration and Configuration Guide for the Full Profile now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.