BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.management.configuration
Interface JDBCConnectionPoolMBean


public interface JDBCConnectionPoolMBean
extends DeploymentMBean

This bean defines a JDBC connection pool.

Author:
Copyright © 2002 BEA Systems, Inc. All Rights Reserved.

Fields inherited from class weblogic.management.configuration.DeploymentMBean
CACHING_STUB_SVUID, DEFAULT_ORDER, MAX_ORDER, MIN_ORDER
 
Fields inherited from class weblogic.management.configuration.ConfigurationMBean
CACHING_STUB_SVUID
 
Method Summary
 java.lang.String getACLName()
          Deprecated.  
 int getCapacityIncrement()
          Increment by which the connection pool capacity is expanded.
 int getConnectionCreationRetryFrequencySeconds()
          Gets the connectionCreationRetryFrequencySeconds attribute of the JDBCConnectionPoolMBean object
 int getConnectionReserveTimeoutSeconds()
          The number of seconds after which a call to reserve a connection from the pool will timeout.
 java.lang.String getDriverName()
          The full package name of the JDBC driver class used to create the physical connections between WebLogic Server and the DBMS for this connection pool.
 int getHighestNumUnavailable()
          Gets the highestNumUnavailable attribute of the JDBCConnectionPoolMBean object
 int getHighestNumWaiters()
          Gets the highestNumWaiters attribute of the JDBCConnectionPoolMBean object
 int getInactiveConnectionTimeoutSeconds()
          Gets the inactiveConnectionTimeoutSeconds attribute of the JDBCConnectionPoolMBean object
 int getInitialCapacity()
          The number of physical database connections to create when creating the connection pool.
 java.lang.String getInitTableName()
          Gets the initTableName attribute of the JDBCConnectionPoolMBean object
 boolean getKeepLogicalConnOpenOnRelease()
           
 boolean getKeepXAConnTillTxComplete()
           
 int getLoginDelaySeconds()
          The number of seconds to delay before creating each physical database connection.
 int getMaxCapacity()
          Maximum number of physical database connections that this connection pool can contain.
 boolean getNeedTxCtxOnClose()
           
 boolean getNewXAConnForCommit()
           
 java.lang.String getPassword()
          Returns the database password as set with setPassword() or as a key=value pair in setProperties().
 int getPreparedStatementCacheSize()
          Deprecated.  
 java.util.Properties getProperties()
          The list of properties passed to the the JDBC Driver to use when creating physical database connections.
 int getRefreshMinutes()
          Deprecated.  
 int getShrinkFrequencySeconds()
          Number of seconds to wait before shrinking a connection pool that has incrementally increased to meet demand.
 int getShrinkPeriodMinutes()
          Deprecated.  
 int getStatementCacheSize()
          Returns size of the statement cache.
 java.lang.String getStatementCacheType()
          Returns the algorithm being used to maintain the statement cache.
 boolean getSupportsLocalTransaction()
          Set to true if the XA driver used to create physical database connections supports SQL without global transactions.
 boolean getTestConnectionsOnCreate()
          Gets the TestConnectionsOnCreate attribute of the JDBCConnectionPoolMBean object
 boolean getTestConnectionsOnRelease()
          Gets the TestConnectionsOnRelease attribute of the JDBCConnectionPoolMBean object
 boolean getTestConnectionsOnReserve()
          Gets the TestConnectionsOnReserve attribute of the JDBCConnectionPoolMBean object
 int getTestFrequencySeconds()
          The number of seconds between database connection tests.
 java.lang.String getTestTableName()
          The name of the table used when testing a physical database connection.
 java.lang.String getURL()
          Returns the database URL used to create the connections in this Connection Pool.
 boolean getXAEndOnlyOnce()
           
 java.lang.String getXAPassword()
          If set, this value overrides the password in the open string.
 boolean isConnLeakProfilingEnabled()
          Returns if JDBC Connection leak profiling is enabled.
 boolean isShrinkingEnabled()
          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.
 void setACLName(java.lang.String name)
          Deprecated.  
 void setCapacityIncrement(int capacity)
          Increment by which the connection pool capacity is expanded.
 void setConnectionCreationRetryFrequencySeconds(int seconds)
          The frequency of retry attempts by the pool to establish connections to the database.
 void setConnectionReserveTimeoutSeconds(int seconds)
          The number of seconds after which a call to reserve a connection from the pool will timeout.
 void setConnLeakProfilingEnabled(boolean enable)
          This property enables JDBC Connection leak profiling.
 void setDriverName(java.lang.String driverClassName)
          The full package name of the JDBC driver class used to create the physical connections between the WebLogic Server and the DBMS for this connection pool.
 void setHighestNumUnavailable(int count)
          The maximum number of connections in the pool that can be made unavailable (to an application) for purposes like refreshing the connection, etc.
 void setHighestNumWaiters(int count)
          The maximum number of waiters that can concurrently block waiting to reserve a connection from the pool.
 void setInactiveConnectionTimeoutSeconds(int seconds)
          The number of seconds of inactivity after which reserved connections will forcibly be released back into the pool.
 void setInitialCapacity(int capacity)
          The number of physical database connections to create when creating the connection pool.
 void setInitTableName(java.lang.String table)
          The name of the table used when initializing a physical database connection.
 void setKeepLogicalConnOpenOnRelease(boolean b)
          Whether the logical JDBC connection is kept open when the physical XA connection is returned to the XA connection pool.
 void setKeepXAConnTillTxComplete(boolean b)
          Set to true to force a connection pool to reserve a physical connection and provide the same connection to an application throughout transaction processing until the distributed transaction is complete.
 void setLoginDelaySeconds(int secs)
          The number of seconds to delay before creating each physical database connection.
 void setMaxCapacity(int capacity)
          Maximum number of physical database connections that this connection pool can contain.
 void setNeedTxCtxOnClose(boolean b)
          Set to true if the XA driver requires a distributed transaction context when closing various JDBC objects, e.g.
 void setNewXAConnForCommit(boolean b)
          Whether a dedicated XA connection is used for commit/rollback processing of a particular distributed transaction.
 void setPassword(java.lang.String password)
          Password attribute passed to the JDBC driver when creating physical database connections.
 void setPreparedStatementCacheSize(int cacheSize)
          Deprecated. @non-dynamic
 void setProperties(java.util.Properties props)
          The list of properties passed to the the JDBC Driver to use when creating physical database connections.
 void setRefreshMinutes(int minutes)
          Deprecated.  
 void setShrinkFrequencySeconds(int seconds)
          Number of seconds to wait before shrinking a connection pool that has incrementally increased to meet demand.
 void setShrinkingEnabled(boolean enable)
          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.
 void setShrinkPeriodMinutes(int minutes)
          Deprecated.  
 void setStatementCacheSize(int cacheSize)
          The number of Prepared and Callable Statements stored in the cache for further use.
 void setStatementCacheType(java.lang.String 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.
 void setSupportsLocalTransaction(boolean support)
          Set to true if the XA driver used to create physical database connections supports SQL without global transactions.
 void setTestConnectionsOnCreate(boolean enable)
          When set to true, WebLogic Server tests a connection after creating it and before adding it to the list of connections available to the client.
 void setTestConnectionsOnRelease(boolean enable)
          When set to true, WebLogic Server tests a connection before returning it to the connection pool.
 void setTestConnectionsOnReserve(boolean enable)
          When set to true, WebLogic Server tests a connection before giving it to the client.
 void setTestFrequencySeconds(int seconds)
          The number of seconds between database connection tests.
 void setTestTableName(java.lang.String table)
          The name of the table used when testing a physical database connection.
 void setURL(java.lang.String url)
          The database URL used to create the connections in this connection pool.
 void setXAEndOnlyOnce(boolean b)
          This property applies to XA connection pools only, and is ignored for non-XA driver.
 void setXAPassword(java.lang.String password)
          If set, this value overrides the password in the open string.
 
Methods inherited from interface weblogic.management.configuration.DeploymentMBean
addTarget, getDeploymentOrder, getTargets, removeTarget, setDeploymentOrder, setTargets
 
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
freezeCurrentValue, getNotes, restoreDefaultValue, setComments, setDefaultedMBean, setNotes, setPersistenceEnabled
 
Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setName, setParent
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, invoke, setAttribute, setAttributes
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Method Detail

setConnLeakProfilingEnabled

public void setConnLeakProfilingEnabled(boolean enable)
                                 throws javax.management.InvalidAttributeValueException
This property enables JDBC Connection leak profiling.

A Connection leak occurs when a connection from the pool is not closed explicitly by calling close() on that connection.

When connection leak profiling is active, the pool will store the stack trace at the time the Connection object is allocated from the pool and given to the client. When a connection leak is detected (when the Connection object is garbage collected), this stack trace is reported.

This feature uses extra resources and will likely slowdown Connection Pool operations, so it is not recommended for production use.

A dynamic MBean attribute
Default Value: false
Parameters:
enable - The new connLeakProfilingEnabled value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

isConnLeakProfilingEnabled

public boolean isConnLeakProfilingEnabled()
Returns if JDBC Connection leak profiling is enabled.

Default Value: false
Returns:
The connLeakProfilingEnabled value

getACLName

public java.lang.String getACLName()
Deprecated.  
Returns the ACL used to control access to this Connection Pool.

Returns:
The aCLName value

setACLName

public void setACLName(java.lang.String name)
                throws javax.management.InvalidAttributeValueException
Deprecated.  
The access control list (ACL) used to control access to this connection pool. Permissions available to this ACL are reserve and admin.

Reserve permission allows users to get logical connections from this connection pool.

Admin permission allows all other operations on this connection pool, including: reset, shrink, shutdown, disable, and enable.

Lack of an ACL allows any user open access (provided that the user passes other WLS security controls).

Parameters:
name - The new aCLName value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getURL

public java.lang.String getURL()
Returns the database URL used to create the connections in this Connection Pool.

Old Property: weblogic.jdbc.connectionPool.url
Returns:
The uRL value

setURL

public void setURL(java.lang.String url)
            throws javax.management.InvalidAttributeValueException
The database URL used to create the connections in this connection pool. The URL is passed to the JDBC driver to create the physical database connections.

Parameters:
url - The new uRL value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getDriverName

public java.lang.String getDriverName()
The full package name of the JDBC driver class used to create the physical connections between WebLogic Server and the DBMS for this connection pool. For example:

com.pointbase.jdbc.jdbcUniversalDriver

It must be the name of a class that implements the java.sql.Driver interface. Check the documentation for the JDBC driver to find the full pathname.

Old Property: weblogic.jdbc.connectionPool.driver
Returns:
The driverName value

setDriverName

public void setDriverName(java.lang.String driverClassName)
                   throws javax.management.InvalidAttributeValueException
The full package name of the JDBC driver class used to create the physical connections between the WebLogic Server and the DBMS for this connection pool. For example:

com.pointbase.jdbc.jdbcUniversalDriver

It must be the name of a class that implements the java.sql.Driver interface. Check the documentation for the JDBC driver to find the full pathname.

Parameters:
driverClassName - The new driverName value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getProperties

public java.util.Properties getProperties()
The list of properties passed to the the JDBC Driver to use when creating physical database connections. The list consists of attribute=value tags, separated by semi-colons. For example user=scott;server=myDB.

Old Property: weblogic.jdbc.connectionPool.props
Returns:
The properties value

setProperties

public void setProperties(java.util.Properties props)
                   throws javax.management.InvalidAttributeValueException
The list of properties passed to the the JDBC Driver to use when creating physical database connections. The list consists of attribute=value tags, separated by semi-colons. For example user=scott;server=myDB.

Note: BEA recommends that you use setPassword(String) to specify the database password so that the value is stored in an encrypted form in config.xml and when displayed on the administration console.

Parameters:
props - The new properties value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getLoginDelaySeconds

public int getLoginDelaySeconds()
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.

Default Value: 0
Old Property: weblogic.jdbc.connectionPool.loginDelaySecs
Returns:
The loginDelaySeconds value

setLoginDelaySeconds

public void setLoginDelaySeconds(int secs)
                          throws javax.management.InvalidAttributeValueException
The number of seconds to delay before creating each physical database connection. Some database servers cannot handle multiple requests for connections in rapid succession. This property allows you to specify a small delay for each database connection. This delay takes place both during initial pool creation and whenever a physical database connection is created.

Default Value: 0
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
secs - The new loginDelaySeconds value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getInitialCapacity

public int getInitialCapacity()
The number of physical database connections to create when creating the connection pool.

Default Value: 1
Old Property: weblogic.jdbc.connectionPool.initialCapacity
Returns:
The initialCapacity value

setInitialCapacity

public void setInitialCapacity(int capacity)
                        throws javax.management.InvalidAttributeValueException
The number of physical database connections to create when creating the connection 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 connection pool will keep available.

A dynamic MBean attribute
Default Value: 1
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
capacity - The new initialCapacity value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getMaxCapacity

public int getMaxCapacity()
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.

Default Value: ServerLegalHelper.DEFAULT_THREAD_POOL_SIZE
Old Property: weblogic.jdbc.connectionPool.maxCapacity
Returns:
The maxCapacity value

setMaxCapacity

public void setMaxCapacity(int capacity)
                    throws javax.management.InvalidAttributeValueException
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.

A dynamic MBean attribute
Default Value: ServerLegalHelper.DEFAULT_THREAD_POOL_SIZE
Legal Minimum Value: 1
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
capacity - The new maxCapacity value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getCapacityIncrement

public int getCapacityIncrement()
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.

Default Value: 1
Old Property: weblogic.jdbc.connectionPool.capacityIncrement
Returns:
The capacityIncrement value

setCapacityIncrement

public void setCapacityIncrement(int capacity)
                          throws javax.management.InvalidAttributeValueException
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.

A dynamic MBean attribute
Default Value: 1
Legal Minimum Value: 1
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
capacity - The new capacityIncrement value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

isShrinkingEnabled

public boolean isShrinkingEnabled()
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.

Default Value: true
Old Property: weblogic.jdbc.connectionPool.allowShrinking
Returns:
The shrinkingEnabled value

setShrinkingEnabled

public void setShrinkingEnabled(boolean enable)
                         throws javax.management.InvalidAttributeValueException
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.

A dynamic MBean attribute
Parameters:
enable - The new shrinkingEnabled value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getShrinkPeriodMinutes

public int getShrinkPeriodMinutes()
Deprecated.  
Number of minutes 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.

Default Value: 15
Old Property: weblogic.jdbc.connectionPool.shrinkPeriodMins
Returns:
The shrinkPeriodMinutes value

setShrinkPeriodMinutes

public void setShrinkPeriodMinutes(int minutes)
                            throws javax.management.InvalidAttributeValueException
Deprecated.  
Number of minutes 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.

A dynamic MBean attribute
Default Value: 15
Legal Minimum Value: 1
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
minutes - The new shrinkPeriodMinutes value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getShrinkFrequencySeconds

public int getShrinkFrequencySeconds()
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.

Default Value: 900
Returns:
The shrinkFrequencySeconds value

setShrinkFrequencySeconds

public void setShrinkFrequencySeconds(int seconds)
                               throws javax.management.InvalidAttributeValueException
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.

A dynamic MBean attribute
Default Value: 900
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
seconds - The new shrinkFrequencySeconds value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getRefreshMinutes

public int getRefreshMinutes()
Deprecated.  
The number of minutes between database connection tests. After every RefreshMinutes 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 Value: 0
Old Property: weblogic.jdbc.connectionPool.refreshTestMinutes
Returns:
The refreshMinutes value

setRefreshMinutes

public void setRefreshMinutes(int minutes)
                       throws javax.management.InvalidAttributeValueException
Deprecated.  
The number of minutes between database connection tests. After every RefreshMinutes 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.

A dynamic MBean attribute
Default Value: 0
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
minutes - The new refreshMinutes value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getTestFrequencySeconds

public int getTestFrequencySeconds()
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.

Default Value: 0
Returns:
The testFrequencySeconds value

setTestFrequencySeconds

public void setTestFrequencySeconds(int seconds)
                             throws javax.management.InvalidAttributeValueException
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.

A dynamic MBean attribute
Default Value: 0
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
seconds - The new testFrequencySeconds value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getTestTableName

public java.lang.String getTestTableName()
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.

Old Property: weblogic.jdbc.connectionPool.testTable
Returns:
The testTableName value

setTestTableName

public void setTestTableName(java.lang.String table)
                      throws javax.management.InvalidAttributeValueException
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.

Parameters:
table - The new testTableName value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

setTestConnectionsOnReserve

public void setTestConnectionsOnReserve(boolean enable)
                                 throws javax.management.InvalidAttributeValueException
When 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.

A dynamic MBean attribute
Default Value: false
Old Property: weblogic.jdbc.connectionPool.testConnsOnReserve
Parameters:
enable - The new testConnectionsOnReserve value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception
See Also:
setTestTableName(java.lang.String)

getTestConnectionsOnReserve

public boolean getTestConnectionsOnReserve()
Gets the TestConnectionsOnReserve attribute of the JDBCConnectionPoolMBean object

Returns:
The TestConnectionsOnReserve value

setTestConnectionsOnRelease

public void setTestConnectionsOnRelease(boolean enable)
                                 throws javax.management.InvalidAttributeValueException
When 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.

A dynamic MBean attribute
Default Value: false
Old Property: weblogic.jdbc.connectionPool.testConnsOnRelease
Parameters:
enable - The new testConnectionsOnRelease value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception
See Also:
setTestTableName(java.lang.String)

getTestConnectionsOnRelease

public boolean getTestConnectionsOnRelease()
Gets the TestConnectionsOnRelease attribute of the JDBCConnectionPoolMBean object

Returns:
The TestConnectionsOnRelease value

setTestConnectionsOnCreate

public void setTestConnectionsOnCreate(boolean enable)
                                throws javax.management.InvalidAttributeValueException
When 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.

A dynamic MBean attribute
Default Value: false
Parameters:
enable - The new testConnectionsOnCreate value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception
See Also:
setTestTableName(java.lang.String)

getTestConnectionsOnCreate

public boolean getTestConnectionsOnCreate()
Gets the TestConnectionsOnCreate attribute of the JDBCConnectionPoolMBean object

Returns:
The TestConnectionsOnCreate value

getPassword

public java.lang.String getPassword()
Returns the database password as set with setPassword() or as a key=value pair in setProperties().

Returns:
The password value

setPassword

public void setPassword(java.lang.String password)
                 throws javax.management.InvalidAttributeValueException
Password attribute passed to the JDBC driver when creating physical database connections. If set, this value overrides any password defined in Properties. The value is stored in an encrypted form in the config.xml file and when displayed on the administration console. Use this method to avoid storing passwords in clear text in config.xml.

Parameters:
password - The new password value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getXAPassword

public java.lang.String getXAPassword()
If set, this value overrides the password in the open string. This password is used to create physical XA database connections. The value is stored in an encrypted form in the config.xml file. This value overrides any password value in the openString defined in Properties.

Returns:
The xAPassword value

setXAPassword

public void setXAPassword(java.lang.String password)
                   throws javax.management.InvalidAttributeValueException
If set, this value overrides the password in the open string. This password is used to create physical XA database connections. The value is stored in an encrypted form in the config.xml file. This value overrides any password value in the openString defined in Properties.

Parameters:
password - The new xAPassword value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getSupportsLocalTransaction

public boolean getSupportsLocalTransaction()
Set to true if the XA driver used to create physical database connections supports SQL without global transactions. Set to false (the default) if the XA driver does not support SQL without global transactions.

This property applies to connection pools that use an XA driver only, and is ignored for connection pools that use non-XA drivers.

Default Value: false
Returns:
true if XA driver supports SQL with no global transaction.

setSupportsLocalTransaction

public void setSupportsLocalTransaction(boolean support)
                                 throws javax.management.InvalidAttributeValueException
Set to true if the XA driver used to create physical database connections supports SQL without global transactions. Set to false (the default) if the XA driver does not support SQL without global transactions.

This property applies to connection pools that use an XA driver only, and is ignored for connection pools that use non-XA drivers.

Parameters:
support - The new supportsLocalTransaction value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getKeepXAConnTillTxComplete

public boolean getKeepXAConnTillTxComplete()

Default Value: false
Returns:
true if the XA connection pool associates the same XA connection with the distributed transaction until the transaction completes. This property applies to XA connection pools only, and is ignored for non-XA driver. Its intention is to workaround specific problems with third party vendor's XA driver.

setKeepXAConnTillTxComplete

public void setKeepXAConnTillTxComplete(boolean b)
                                 throws javax.management.InvalidAttributeValueException
Set to true to force a connection pool to reserve a physical connection and provide the same connection to an application throughout transaction processing until the distributed transaction is complete.

This property applies to XA connection pools only, and is ignored for non-XA driver. Its intention is to workaround specific problems with third party vendor's XA driver.

Parameters:
b - The new keepXAConnTillTxComplete value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getNeedTxCtxOnClose

public boolean getNeedTxCtxOnClose()

Default Value: false
Returns:
true if the XA driver requires a distributed transaction context when closing various JDBC objects, e.g. result sets, statements, connections etc. If it is specified to true, SQL exceptions that are thrown while closing the JDBC objects in no transaction context will be swallowed. This property applies to XA connection pools only, and is ignored for non-XA driver. Its intention is to workaround specific problems with third party vendor's XA driver.

setNeedTxCtxOnClose

public void setNeedTxCtxOnClose(boolean b)
                         throws javax.management.InvalidAttributeValueException
Set to true if the XA driver requires a distributed transaction context when closing various JDBC objects, e.g. result sets, statements, connections etc. If it is specified to true, SQL exceptions that are thrown while closing the JDBC objects in no transaction context will be swallowed.

This property applies to XA connection pools only, and is ignored for non-XA drivers. Its intention is to workaround specific problems with third party vendor's XA driver.

Parameters:
b - The new needTxCtxOnClose value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getXAEndOnlyOnce

public boolean getXAEndOnlyOnce()

Default Value: false
Returns:
true if XAResource.end() will be called only once for each pending XAResource.start(). e.g. the XA driver will not be called XAResource.end(TMSUSPEND), XAResource.end(TMSUCCESS) successively. This property applies to XA connection pools only, and is ignored for non-XA driver. Its intention is to workaround specific problems with third party vendor's XA driver.

setXAEndOnlyOnce

public void setXAEndOnlyOnce(boolean b)
                      throws javax.management.InvalidAttributeValueException
This property applies to XA connection pools only, and is ignored for non-XA driver. Its intention is to workaround specific problems with third party vendor's XA driver. Whether XAResource.end() will only be called only once for each pending XAResource.start(). e.g. the XA driver will not be called XAResource.end(TMSUSPEND), XAResource.end(TMSUCCESS) successively.

Parameters:
b - The new xAEndOnlyOnce value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getNewXAConnForCommit

public boolean getNewXAConnForCommit()

Default Value: false
Returns:
true if a dedicated XA connection is used for commit/rollback processing of a particular distributed transaction. This property applies to XA connection pools only, and is ignored for non-XA driver. Its intention is to workaround specific problems with third party vendor's XA driver.

setNewXAConnForCommit

public void setNewXAConnForCommit(boolean b)
                           throws javax.management.InvalidAttributeValueException
Whether a dedicated XA connection is used for commit/rollback processing of a particular distributed transaction.

This property applies to XA connection pools only, and is ignored for non-XA driver. Its intention is to workaround specific problems with third party vendor's XA driver.

Parameters:
b - The new newXAConnForCommit value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getKeepLogicalConnOpenOnRelease

public boolean getKeepLogicalConnOpenOnRelease()

Default Value: false
Returns:
true if the logical JDBC connection is kept open when the physical XA connection is returned to the XA connection pool. This property applies to XA connection pools only, and is ignored for non-XA driver. Its intention is to workaround specific problems with third party vendor's XA driver.

setKeepLogicalConnOpenOnRelease

public void setKeepLogicalConnOpenOnRelease(boolean b)
                                     throws javax.management.InvalidAttributeValueException
Whether the logical JDBC connection is kept open when the physical XA connection is returned to the XA connection pool.

This property applies to XA connection pools only, and is ignored for non-XA driver. Its intention is to workaround specific problems with third party vendor's XA driver.

Parameters:
b - The new keepLogicalConnOpenOnRelease value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

setPreparedStatementCacheSize

public void setPreparedStatementCacheSize(int cacheSize)
Deprecated. @non-dynamic
The number of prepared statements stored in the cache for further use. WebLogic Server can reuse prepared statements in the cache without reloading them, which can increase server performance. Setting the size of the prepared statement cache to 0 turns it off.

Legal Value: (value >= weblogic.management.configuration.JDBCLegalHelper.MIN_CACHE_STATEMENTS_SIZE) && (value <= weblogic.management.configuration.JDBCLegalHelper.MAX_CACHE_STATEMENTS_SIZE)
Parameters:
cacheSize - The new preparedStatementCacheSize value
See Also:
getPreparedStatementCacheSize()

getPreparedStatementCacheSize

public int getPreparedStatementCacheSize()
Deprecated.  
Returns size of the prepared statement cache. The size of the cache is a number of prepared statements created from particular connection and stored in the cache for further use.

Default Value: 0
Returns:
The preparedStatementCacheSize value
See Also:
setPreparedStatementCacheSize(int)

setConnectionReserveTimeoutSeconds

public void setConnectionReserveTimeoutSeconds(int seconds)
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.

A dynamic MBean attribute
Default Value: 10
Legal Minimum Value: -1
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
seconds - The new connectionReserveTimeoutSeconds value

getConnectionReserveTimeoutSeconds

public int getConnectionReserveTimeoutSeconds()
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.

Returns:
The connectionReserveTimeoutSeconds value

setConnectionCreationRetryFrequencySeconds

public void setConnectionCreationRetryFrequencySeconds(int seconds)
The frequency of retry attempts by the pool to establish connections to the database. Default implies feature is disabled.

A dynamic MBean attribute
Default Value: 0
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
seconds - The new connectionCreationRetryFrequencySeconds value

getConnectionCreationRetryFrequencySeconds

public int getConnectionCreationRetryFrequencySeconds()
Gets the connectionCreationRetryFrequencySeconds attribute of the JDBCConnectionPoolMBean object

Returns:
The connectionCreationRetryFrequencySeconds value

setInactiveConnectionTimeoutSeconds

public void setInactiveConnectionTimeoutSeconds(int seconds)
The number of seconds of inactivity after which reserved connections will forcibly be released back into the pool. Default implies feature is disabled.

A dynamic MBean attribute
Default Value: 0
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
seconds - The new inactiveConnectionTimeoutSeconds value

getInactiveConnectionTimeoutSeconds

public int getInactiveConnectionTimeoutSeconds()
Gets the inactiveConnectionTimeoutSeconds attribute of the JDBCConnectionPoolMBean object

Returns:
The inactiveConnectionTimeoutSeconds value

setHighestNumWaiters

public void setHighestNumWaiters(int count)
The maximum number of waiters that can concurrently block waiting to reserve a connection from the pool.

A dynamic MBean attribute
Default Value: java.lang.Integer.MAX_VALUE
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
count - The new highestNumWaiters value

getHighestNumWaiters

public int getHighestNumWaiters()
Gets the highestNumWaiters attribute of the JDBCConnectionPoolMBean object

Returns:
The highestNumWaiters value

setHighestNumUnavailable

public void setHighestNumUnavailable(int count)
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.

A dynamic MBean attribute
Default Value: 0
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Integer.MAX_VALUE
Parameters:
count - The new highestNumUnavailable value

getHighestNumUnavailable

public int getHighestNumUnavailable()
Gets the highestNumUnavailable attribute of the JDBCConnectionPoolMBean object

Returns:
The highestNumUnavailable value

setInitTableName

public void setInitTableName(java.lang.String table)
                      throws javax.management.InvalidAttributeValueException
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.

Parameters:
table - The new initTableName value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

getInitTableName

public java.lang.String getInitTableName()
Gets the initTableName attribute of the JDBCConnectionPoolMBean object

Returns:
The initTableName value

setStatementCacheSize

public void setStatementCacheSize(int cacheSize)
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.

A dynamic MBean attribute
Legal Value: (value >= JDBCLegalHelper.MIN_CACHE_STATEMENTS_SIZE) && (value <= JDBCLegalHelper.MAX_CACHE_STATEMENTS_SIZE)
Parameters:
cacheSize - The new statementCacheSize value
See Also:
getStatementCacheSize()

getStatementCacheSize

public int getStatementCacheSize()
Returns size of the statement cache. The size of the cache is the number of Prepared and Callable statements created from a particular connection and stored in the cache for further use.

Default Value: JDBCLegalHelper.DEFAULT_CACHE_STATEMENTS_SIZE
Returns:
The statementCacheSize value
See Also:
setStatementCacheSize(int)

setStatementCacheType

public void setStatementCacheType(java.lang.String type)
The algorithm used to maintain the statement cache:

getStatementCacheType

public java.lang.String getStatementCacheType()
Returns the algorithm being used to maintain the statement cache. With "LRU" algorithm, Least Recently Used entry in cache is ejected to accomodate a new entry. With "Fixed" algorithm, entries stay fixed in the cache.

Default Value: JDBCLegalHelper.STATEMENT_CACHE_TYPE_DEFAULT
Returns:
The statementCacheType value
See Also:
setStatementCacheType(java.lang.String)

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81b