
Connection Validation Required
Connection | If true, the pool validates connections (checks to find out if they are usable) before providing them to an |
Validation | application. |
Required |
|
| If possible, keep the default value, false. Requiring connection validation forces the server to apply the |
| validation algorithm every time the pool returns a connection, which adds overhead to the latency of |
| getConnection(). If the database connectivity is reliable, you can omit validation. |
Validation Method Type of connection validation to perform. Must be one of:
■
■metadata: attempt to get metadata from the connection.
■table (performing a query on a specified table). Must also set Table Name. You may have to use this method if the JDBC driver caches calls to setAutoCommit() and getMetaData().
Table Name | Table name to query when Validation Method is “table.” |
Close All | Whether to close all connections in the pool if a single validation check fails. The default is false. One |
Connections On | attempt will be made to |
Any Failure |
|
Connector Connection Pool Settings
From a performance standpoint, connector connection pools are similar to JDBC connection pools. Follow all the recommendations in the previous section, “Tuning JDBC Connection Pools” on page 77
Transaction Support
You may be able to improve performance by overriding the default transaction support specified for each connector connection pool.
For example, consider a case where an Enterprise Information System (EIS) has a connection factory that supports local transactions with better performance than global transactions. If a resource from this EIS needs to be mixed with a resource coming from another resource manager, the default behavior forces the use of XA transactions, leading to lower performance. However, by changing the EIS’s connector connection pool to use LocalTransaction transaction support and leveraging the Last Agent Optimization feature previously described, you could leverage the
In the Admin Console, specify transaction support when you create a new connector connection pool, and when you edit a connector connection pool at Resources > Connectors > Connector Connection Pools.
Also set transaction support using asadmin. For example, the following asadmin command could be used to create a connector connection pool “TESTPOOL” with the
80 | Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 2009 |