Sun Java System Application Server Enterprise Edition 8.1 2005Q2 High Availability Administration Guide

- Previous: Getting the JDBC URL
- Next: Creating a JDBC Resource

### Creating a Connection Pool

The following table summarizes connection pool settings required for the HADB. Change the Steady Pool Size when adding nodes, but do not change other settings.

Table 3–9 HADB Connection Pool Settings

Setting | Required Value for HADB
--- | ---
Name | The HADB JDBC resource’s Pool Name setting must refer to this name
Database Vendor | HADB 4.4
Global Transaction Support | Unchecked/false
DataSource Classname |
    com.sun.hadb.jdbc.ds.HadbDataSource
Steady Pool Size | Use 8 connections for each active HADB node. For more detailed information, see the System Deployment Guide.
Connection Validation Required | Checked/true
Validation Method | `meta-data`
Table Name | Do not specify
Fail All Connections | Unchecked/false
Transaction Isolation | `repeatable-read`
Guarantee Isolation Level | Checked/true

The following table summarizes connection pool properties required for the HADB. Change `serverList` when adding nodes, but do not change other properties.

Table 3–10 HADB Connection Pool Properties

Property | Description
--- | ---
username | Name of the `storeuser` to use in the `asadmin create-session-store` command.
password | Password (`storepassword` ) to us in the `asadmin create-session-store` command.
serverList | JDBC URL of the HADB. To determine this value, see Getting the JDBC URL You must change this value if you add nodes to the database. See Adding Nodes.
cacheDatabaseMetaData | When `false` , as required, ensures that calls to `Connection.getMetaData()` make calls to the database, which ensures that the connection is valid.
eliminateRedundantEndTransaction | When `true` , as required, improves performance by eliminating redundant commit and rollback requests and ignoring these requests if no transaction is open.
maxStatement | Maximum number of statements per open connection that are cached in the driver statement pool. Set this property to `20`.

##### Example 3–5 Creating a Connection Pool

Here is an example `asadmin create-jdbc-connection-pool` command that creates an HADB JDBC connection pool:

    asadmin create-jdbc-connection-pool
    --user adminname --password secret
    --datasourceclassname com.sun.hadb.jdbc.ds.HadbDataSource
    --steadypoolsize=32
    --isolationlevel=repeatable-read
    --isconnectvalidatereq=true
    --validationmethod=meta-data
    --property username=storename:password=secret456:serverList=
    host\:port,host\:port,
    host\\:port,host\:port,
    host\:port,host\:port
    :cacheDatabaseMetaData=false:eliminateRedundantEndTransaction=true hadbpool

On Solaris, escape colon characters (`:`) within property values with double backslashes (`\\`). On Windows, escape colon characters (`:`) with single backslashes ( `\`).

- Previous: Getting the JDBC URL
- Next: Creating a JDBC Resource

- © 2010, Oracle Corporation and/or its affiliates