The use of connection pooling improves application performance by doing the following:
■
Creating connections in advance. The cost of establishing connections is moved outside of
the code that is critical for performance.
■
Reusing connections. The number of times connections are created is signicantly lowered.
■
Controlling the amount of resources a single application can use at any moment.
JDBC resources can be created and edited using the Admin Console's Java tab ⇒ Resources sub
tab for the conguration. You can also use the wadm create-jdbc-resource and
set-jdbc-resource-prop commands. For more information, see the Sun Java System Web
Server 7.0 Update 1 Administrator’s Guide.
Note – Each dened pool is instantiated during Web Server startup. However, the connections
are only created the rst time the pool is accessed. You should jump-start a pool before putting
it under heavy load.
JDBC resource statistics are available through the Admin Console, CLI, and stats.xml only.
They are not shown in perfdump . Some of the monitoring data is unavailable through the
Admin Console and can only be viewed through the CLI using wadm get-config-stats and
through the stats.xml output.
A pool is created on demand, that is, it is created the rst time it is used. The monitoring
statistics are not displayed until the rst time the pool is used.
JDBC Resource Statistics AvailableThrough the Admin Console
The following table shows an example of the JDBC resource statistics displayed through the
Admin Console:
TABLE2–9 JDBC ResourceStatistics
Connections 32
Free Connections 0
Leased Connections 32
AverageQueue Time 1480.00
Queued Connections 40
Connection Timeout 100
To change the settings for a JDBC resource through the Admin Console, for the conguration,
choose the Java tab ⇒ Resources sub tab. Select the JDBC resource. The settings are available on
the Edit JDBC Resource page. To change the JDBC resource through the
command-line-interface, use wadm set-jdbc-resource-prop.
UsingMonitoringDatatoTuneYour Server
Chapter2 • TuningSunJavaSystemWebServer 73