BEA Logo BEA WebLogic Server Release 6.1

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

  |  

  WebLogic Server Doc Home   |     Console Online Help   |   Previous Topic   |   Next Topic   |   Contents   |   Index   |   View as PDF

JDBC Connection Pool

 

These procedures describe how to use the Administration Console to set the attributes for configuring and managing connection pools, which are an essential part of database connectivity.

For more information, see

 


Configure a JDBC Connection Pool

  1. Click to expand the JDBC node.

  2. Click the Connection Pools node. The Connection Pool table displays in the right pane showing all the connection pools defined in your domain.

  3. Click the Configure a New JDBC Connection Pool text link. A dialog displays in the right pane showing the tabs associated with configuring a new connection pool.

  4. Enter values in the Name, URL, Driver Classname, Properties, Password, and Open String Password attribute fields.

  5. Click Create to create a connection pool instance with the name you specified in the Name field. The new instance is added under the Connection Pools node in the left pane.

  6. Click the Connections and Testing tabs and change the attribute fields or accept the default values as assigned.

  7. Click Apply to save any changes you made.

For what's next in setting connectivity, see the Configuration Procedures in Managing JDBC Connectivity.

 


Clone a JDBC Connection Pool

  1. Click to expand the JDBC node.

  2. Click the Connection Pools node. The Connection Pool table displays in the right pane showing all the connection pools defined in your domain.

  3. Click the Clone icon in the row of the connection pool you want to clone. A dialog displays in the right pane showing the tabs associated with cloning a connection pool.

  4. Enter values in the Name, URL, Driver Classname, Properties, and Password attribute fields.

  5. Click Create to create a connection pool instance with the name you specified in the Name field. The new instance is added under the Connection Pools node in the left pane.

  6. Click the Connections and Testing tabs and change the attribute fields or accept the default values as assigned.

  7. Click Apply to save any changes you made.

 


Delete a JDBC Connection Pool

  1. Click to expand the JDBC node.

  2. Click the Connection Pools node. The Connection Pool table displays in the right pane showing all the connection pools defined in your domain.

  3. Click the Delete icon in the row of the connection pool you want to delete. A dialog displays in the right pane asking you to confirm your deletion request.

  4. Click Yes to delete the connection pool. The connection pool icon under the Connection Pools node is deleted.

 


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

  1. Click the instance node in the left pane under Connection Pools for the pool you want to assign. A dialog displays in the right pane showing the tabs associated with this instance.

  2. Click the Targets tab.

  3. Complete the following steps for the Servers or Clusters tabs:

    1. Select one or more targets in the Available column to which you want to assign the connection pool.

    2. Click the mover control to move the targets you selected to the Chosen column.

    3. Click Apply to save your assignments.

 


Configuration

These tables describe the attributes you set in the Administration Console to configure and manage connection pools, which are an essential part of database connectivity. For the procedures you need to follow to set connectivity, see the Configuration Procedures in Managing JDBC Connectivity and Programming WebLogic JDBC, the developers' guide.

General

Attribute

Description

Range of Values

Default Value

Name

This attribute returns the name of the connection pool.

The name can be up to 256 alphanumeric characters, but may not contain commas or spaces.

Null

URL

The URL for the database, as specified in the JDBC driver documentation. The URL is passed to the driver to create the physical database connections.



Driver Class Name

The string containing the name of the JDBC driver class. This is the full package name of the JDBC 2-tier driver class used to create the physical connections between the WebLogic Server and the DMBS for this connection pool. It must be the name of a c lass that implements the java.sql.Driver interface. Check the documentation for the JDBC driver to find the full path name.



Properties

The list of the properties passed to this JDBC driver.



Password

This value overrides any password defined in Properties (as a name/value pair). This attribute is passed to the 2-tier JDBC driver when creating physical database connections. The value is stored in an encrypted form in the config.xml and can be used to avoid storing cleartext passwords in that file.


Null

Open String Password

If set, this value overrides the password in the open string.

This password is used in the open string for creating an XA physical database connection.

The value is stored in an encrypted form in the config.xml.



Connections

Attribute

Description

Range of Values

Default Value

Login Delay Seconds

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. Some database servers cannot handle multiple requests for connections in rapid succession. This property allows you to build in a small delay to let the database server catch up. This delay takes place both during initial pool creation and during the lifetime of the pool whenever a physical database connection is created

Integer in seconds

Default = 0

Initial Capacity

The number of physical database connections to create when configuring the pool. If unable to create this number of connections, creation of this Connection Pool will fail. This is also the minimum number of physical connections the pool will keep available.

Integer. Minimum = 0.

Default = 1.

Maximum Capacity

This attribute sets maximum number of physical database connections that this connection pool can contain. Different JDBC drivers and database servers will likely limit the number of possible physical connections.

Integer.
Legal Minimum =1.

Default = 1.

Capacity Increment

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

Integer. Minimum = 0.

Default = 1.

Allow Shrinking

Set to true to enable pool shrinking. Indicates whether or not the pool can shrink back to its InitialCapacity when connections are detected to not be in use.

Boolean

Selected = true

Not Selected = false

Default = true

Shrink Period

This attribute sets the number of minutes to wait before shrinking a connection pool that has incrementally increased to meet demand. ShrinkingEnabled must be true for shrinking to take place.

Integer. Units in minutes. Minimum = 1.

Default = 15.

Refresh Period

This attribute sets the connection refresh interval. Every unused connection will be tested using TestTableName. Connections that do not pass the test will be closed and reopened in an attempt to reestablish a valid physical database connection. If TestTableName is not set then the test will not be performed.

Integer. Units in minutes.

Minimum = 0.

Maximum = 35791394

Default = 0.

Supports Local Transaction

This attribute applies to XA connection pools only, and is ignored for non-XA driver. True if XA driver supports SQL with no global transaction.

Boolean

Selected = true

Not Selected = false


Not selected (default) = false.

Testing

Attribute

Description

Range of Values

Default Value

Test Table Name

This attribute sets the name of the table that will be used when testing a physical database connection. The default SQL 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, after that leading token, will be taken as a literal sql statement that will be used to test a connection.

String

null

Test Connections On Reserve

This is attribute is used to determine if the connections on reserve will be tested. When set to true, the WebLogic Server tests a connection after 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).

Boolean

Selected = true

Not Selected = false


Default = false.

Test Connections On Release

This attribute is used to determine if connections that are being released are tested. When set to true, the 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.

Boolean

Selected = true

Not Selected = false


Default = false.

Targets

Servers

Attribute

Description

Range of Values

Default Value

Targets

This attribute sets the target servers for this deployment

String

The default is [Lweblogic.management.configuration.TargetMBean;@2c84d9

Clusters

Attribute

Description

Range of Values

Default Value

Targets

This attribute sets the target clusters for this deployment

String

The default is [Lweblogic.management.configuration.TargetMBean;@2c84d9

Monitoring

Attribute

Description

Range of Values

Default Value

Configured to Deploy On

This attribute is an integer that shows the number of servers on which the pool is configured to deploy.

Integer.


Instances Currently Active

This attribute is an integer that shows the number of servers that are currently active for this pool.

Integer.


Notes

Attribute

Description

Range of Values

Default Value

Notes

This attribute provides a space for user supplied information.

The value must be an alphanumeric string.

Null

For more information, see Managing JDBC Connectivity in the Administration Guide and Programming WebLogic JDBC, the developers' guide.

 

back to top previous page next page