bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Administration Console Online Help

 Previous Next Contents Index  

 


JDBC Connection Pool --> Configuration --> Connections

Tasks     Related Topics     Attributes

Overview

In the JDBC Connection Pool—>Configuration—>Connections tab, you specify the number of connections in the connection pool and details for each connection in the connection pool.

A connection pool contains a group of JDBC connections that are created when the connection pool is registered, usually when starting up WebLogic Server. Your application borrows a connection from the connection pool, uses it, then returns it to the connection pool by closing it.

Tasks

Creating and Configuring a JDBC Connection Pool

Deploying a JDBC Connection Pool to One or More Servers or Clusters

Cloning a JDBC Connection Pool

Monitoring Connections in a JDBC Connection Pool

Related Topics

JDBC

Increasing Performance with the Statement Cache

Introduction to WebLogic JDBC in Programming WebLogic JDBC

Third-Party Driver Configuration and Performance Requirements in Programming WebLogic JTA

Attributes

Table 10-2

Attribute Label

Description

Value Constraints

Initial Capacity

The number of physical database connections to create when creating the connection pool.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: InitialCapacity

Minimum: 0

Maximum: 2147483647

Default: 1

Dynamic: yes

Maximum Capacity

Maximum number of physical database connections that this connection pool can contain. Different JDBC Drivers and database servers may limit the number of possible physical connections.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: MaxCapacity

Minimum: 1

Maximum: 2147483647

Default: 15

Dynamic: yes

Capacity Increment

Increment by which the connection pool capacity is expanded. When there are no more available physical connections to service requests, the connection pool will create this number of additional physical database connections and add them to the connection pool. The connection pool will ensure that it does not exceed the maximum number of physical connections as set by MaxCapacity.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: CapacityIncrement

Minimum: 1

Maximum: 2147483647

Default: 1

Dynamic: yes

Prepared Statement Cache Type

The algorithm used to maintain the statement cache:

  • LRU - After the statementCacheSize is met, the Least Recently Used statement is removed when a new statement is used.

  • Fixed - The first statementCacheSize number of statements is stored and stay fixed in the cache. No new statements are cached unless the cache is manually cleared.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: StatementCacheType

Default: LRU

Valid values:

  • LRU

  • FIXED

Statement Cache Size

The number of Prepared and Callable Statements stored in the cache for further use. WebLogic Server can reuse statements in the cache without reloading them, which can increase server performance. Setting the size of the statement cache to 0 turns it off. Each connection in the pool has its own cache of statements.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: StatementCacheSize

Default: 10

Dynamic: yes

Advanced Attributes

Table 10-3

Attribute Label

Description

Value Constraints

Login Delay

The number of seconds to delay before creating each physical database connection. This delay takes place both during initial pool creation and during the lifetime of the pool whenever a physical database connection is created.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: LoginDelaySeconds

Units: seconds

Minimum: 0

Maximum: 2147483647

Default: 0

Allow Shrinking

Indicates whether or not the pool can shrink back to its InitialCapacity when it is detected that connections created during increased traffic are not being used.

When shrinking, the number of connections is reduced to the greater of either the initial capacity or the current number of connections in use.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: ShrinkingEnabled

Default: true

Valid values:

  • true

  • false

Dynamic: yes

Shrink Frequency

Number of seconds to wait before shrinking a connection pool that has incrementally increased to meet demand. ShrinkingEnabled must be set to true for a connection pool to shrink.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: ShrinkFrequencySeconds

Units: seconds

Minimum: 0

Maximum: 2147483647

Default: 900

Dynamic: yes

Test Frequency

The number of seconds between database connection tests. After every TestFrequencySeconds interval, unused database connections are tested using TestTableName. Connections that do not pass the test will be closed and reopened to re-establish a valid physical database connection. If TestTableName is not set, the test will not be performed. Default implies feature is disabled.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: TestFrequencySeconds

Units: seconds

Minimum: 0

Maximum: 2147483647

Default: 0

Dynamic: yes

Test Reserved Connections

When selected (set to true), WebLogic Server tests a connection before giving it to the client. The test adds a small delay in serving the client's request for a connection from the pool, but ensures that the client receives a working connection (assuming that the DBMS is available and accessible).

The attribute TestTableName must be enabled for TestConnectionsOnReserve to be effective.

This attribute is required for connection pools used within a MultiPool that uses the High Availability algorithm.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: TestConnectionsOnReserve

Default: false

Valid values:

  • true

  • false

Dynamic: yes

Test Created Connections

When selected (set to true), WebLogic Server tests a connection after creating it and before adding it to the list of connections available to the client. The test adds a small delay in creating the connection, but ensures that the client receives a working connection (assuming that the DBMS is available and accessible). The attribute TestTableName must be enabled for TestConnectionsOnCreate to be effective.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: TestConnectionsOnCreate

Default: false

Valid values:

  • true

  • false

Dynamic: yes

Test Released Connections

When selected (set to true), WebLogic Server tests a connection before returning it to the connection pool. If all connections in the pool are already in use and a client is waiting for a connection, the client's wait will be slightly longer while the connection is tested. The attribute TestTableName must be enabled for TestConnectionsOnRelease to be effective.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: TestConnectionsOnRelease

Default: false

Valid values:

  • true

  • false

Dynamic: yes

Connection Reserve Timeout

The number of seconds after which a call to reserve a connection from the pool will timeout. When set to -1, a call will never timeout.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: ConnectionReserveTimeoutSeconds

Units: seconds

Minimum: -1

Maximum: 2147483647

Default: 10

Dynamic: yes

Connection Creation Retry Frequency

The frequency of retry attempts by the pool to establish connections to the database. Default implies feature is disabled.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: ConnectionCreationRetryFrequencySeconds

Units: seconds

Minimum: 0

Maximum: 2147483647

Default: 0

Dynamic: yes

Inactive Connection Timeout

The number of seconds of inactivity after which reserved connections will forcibly be released back into the pool. Default implies feature is disabled.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: InactiveConnectionTimeoutSeconds

Units: seconds

Minimum: 0

Maximum: 2147483647

Default: 0

Dynamic: yes

Maximum waiting for connection

The maximum number of waiters that can concurrently block waiting to reserve a connection from the pool.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: HighestNumWaiters

Minimum: 0

Maximum: 2147483647

Default: 2147483647

Dynamic: yes

Maximum connections made unavailable

The maximum number of connections in the pool that can be made unavailable (to an application) for purposes like refreshing the connection, etc. Note that in cases likes the backend system being unavailable, this specified value could be exceeded due to factors outside the pool's control. Default implies feature is disabled.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: HighestNumUnavailable

Minimum: 0

Maximum: 2147483647

Default: 0

Dynamic: yes

Test Table Name

The name of the table used when testing a physical database connection. The default SQL code used to test a connection is

"select count(*) from TestTableName"

The TestTableName must exist and be accessible to the database user for the connection. Most database servers optimize this SQL to avoid a table scan, but it is still a good idea to set TestTableName to the name of a table that is known to have few rows, or even no rows.

If TestTableName begins with "SQL ", then the rest of the string following that leading token will be taken as a literal sql statement that will be used to test a connection.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: TestTableName


Init Table Name

The name of the table used when initializing a physical database connection. The default SQL code used to initialize a connection is

"select count(*) from InitTableName"

The InitTableName must exist and be accessible to the database user for the connection. Most database servers optimize this SQL to avoid a table scan, but it is still a good idea to set InitTableName to the name of a table that is known to have few rows, or even no rows.

If InitTableName begins with "SQL ", then the rest of the string following that leading token will be taken as a literal sql statement that will be used to initialize a connection.

MBean: weblogic.management.
configuration.
JDBCConnectionPoolMBean

Attribute: InitTableName


 

Back to Top Previous Next