|
Oracle Fusion Middleware Oracle WebLogic Server 10.3.1 MBean API Reference 11g Release 1 (10.3.1) Part Number E13945-02 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JDBCSystemResourceMBean
public interface JDBCConnectionPoolMBean
This bean defines a JDBC connection pool.
This is a type-safe interface for a
WebLogic Server MBean, which you can import into your client
classes and access through
weblogic.management.MBeanHome
. As of 9.0, the
MBeanHome
interface and all type-safe interfaces for
WebLogic Server MBeans are deprecated. Instead, client classes that
interact with WebLogic Server MBeans should use standard JMX design
patterns in which clients use the
javax.management.MBeanServerConnection
interface to
discover MBeans, attributes, and attribute types at runtime.
Field Summary |
---|
Fields inherited from interface weblogic.management.configuration.DeploymentMBean |
---|
DEFAULT_ORDER, MAX_ORDER, MIN_ORDER |
Fields inherited from interface weblogic.management.configuration.ConfigurationMBean |
---|
DEFAULT_EMPTY_BYTE_ARRAY |
Method Summary | |
---|---|
String |
getACLName()
Deprecated. The access control list (ACL) used to control access to this connection pool. |
int |
getCapacityIncrement()
Deprecated. The increment by which this JDBC connection pool's capacity is expanded. |
int |
getConnectionCreationRetryFrequencySeconds()
Deprecated. The number of seconds between when the connection pool retries to establish connections to the database. |
int |
getConnectionReserveTimeoutSeconds()
Deprecated. The number of seconds after which a call to reserve a connection from the connection pool will timeout. |
int |
getCountOfRefreshFailuresTillDisable()
Deprecated. The number of consecutive pool con refresh failures till we disable the pool. |
int |
getCountOfTestFailuresTillFlush()
Deprecated. The number of consecutive pool con test failures till we flush the pool. |
String |
getDriverName()
Deprecated. The full package name of JDBC driver class used to create the physical database connections in the connection pool. |
boolean |
getEnableResourceHealthMonitoring()
Deprecated. Returns whether JTA resource health monitoring is enabled for this XA connection pool. |
int |
getHighestNumUnavailable()
Deprecated. The maximum number of connections in the connection pool that can be made unavailable for use by an application. |
int |
getHighestNumWaiters()
Deprecated. The maximum number of connection requests that can concurrently block threads while waiting to reserve a connection from the connection pool. |
int |
getInactiveConnectionTimeoutSeconds()
Deprecated. The number of inactive seconds on a reserved connection before WebLogic Server reclaims the connection and releases it back into the connection pool. |
int |
getInitialCapacity()
Deprecated. The number of physical database connections to create when creating this JDBC connection pool. |
String |
getInitSQL()
Deprecated. SQL statement to execute that will initialize a newly created physical connection. |
boolean |
getKeepLogicalConnOpenOnRelease()
Deprecated. Specifies whether the logical JDBC connection is kept open when the physical XA connection is returned to the XA connection pool. |
boolean |
getKeepXAConnTillTxComplete()
Deprecated. Specifies whether the XA connection pool associates the same XA connection with the distributed transaction until the transaction completes. |
int |
getLoginDelaySeconds()
Deprecated. The number of seconds to delay before creating each physical database connection. |
int |
getMaxCapacity()
Deprecated. The maximum number of physical database connections that this JDBC connection pool can contain. |
boolean |
getNeedTxCtxOnClose()
Deprecated. Specifies whether the XA driver requires a distributed transaction context when closing various JDBC objects (result sets, statements, connections, and so on). |
boolean |
getNewXAConnForCommit()
Deprecated. Specifies whether a dedicated XA connection is used for commit/rollback processing of a particular distributed transaction. |
String |
getPassword()
Deprecated. The database password. |
byte[] |
getPasswordEncrypted()
Deprecated. The encrypted database password. |
int |
getPreparedStatementCacheSize()
Deprecated. The number of prepared statements stored in the cache. |
Properties |
getProperties()
Deprecated. The list of properties passed to the JDBC driver that are used to create physical database connections. |
int |
getRefreshMinutes()
Deprecated. The number of minutes between database connection tests. |
boolean |
getRollbackLocalTxUponConnClose()
Deprecated. Specifies whether the WLS connection pool will call rollback() on the connection before putting it back in
the pool. |
int |
getSecondsToTrustAnIdlePoolConnection()
Deprecated. The number of seconds within the use of a pooled connection that WebLogic Server trusts that the connection is still viable and will skip connection testing. |
int |
getShrinkFrequencySeconds()
Deprecated. The number of seconds before WebLogic Server shrinks the connection pool to the original number of connections or number of connections currently in use. |
int |
getShrinkPeriodMinutes()
Deprecated. The number of minutes to wait before shrinking a connection pool that has incrementally increased to meet demand. |
int |
getStatementCacheSize()
Deprecated. The number of prepared and callable statements stored in the cache. |
String |
getStatementCacheType()
Deprecated. The algorithm used for maintaining the prepared statements stored in the cache. |
int |
getStatementTimeout()
Deprecated. The time after which a statement currently being executed will be timed-out. |
boolean |
getTestConnectionsOnCreate()
Deprecated. Specifies whether WebLogic Server tests a connection after creating it but before adding it to the list of connections available in the pool. |
boolean |
getTestConnectionsOnRelease()
Deprecated. Specifies whether WebLogic Server tests a connection before returning it to this JDBC connection pool. |
boolean |
getTestConnectionsOnReserve()
Deprecated. Specifies whether WebLogic Server tests a connection before giving it to the client. |
int |
getTestFrequencySeconds()
Deprecated. The number of seconds between when WebLogic Server tests unused database connections. |
int |
getTestStatementTimeout()
Deprecated. The time after which the test statement (configured by applications using the pool attribute Test Table Name) or initialization statement (configured by applications using the pool attribute InitSQL) currently being executed will be timed out. |
String |
getTestTableName()
Deprecated. The name of the database table to use when testing physical database connections. |
String |
getURL()
Deprecated. The URL of the database to connect to. |
boolean |
getXAEndOnlyOnce()
Deprecated. Specifies that XAResource.end() is called only once for each pending XAResource.start(). |
String |
getXAPassword()
Deprecated. The password that is used to create physical XA database connections. |
byte[] |
getXAPasswordEncrypted()
Deprecated. The password that is used to create physical XA database connections. |
int |
getXAPreparedStatementCacheSize()
Deprecated. The maximum number of prepared statements cached by this particular XA connection pool. |
int |
getXARetryDurationSeconds()
Deprecated. Determines the duration in seconds for which the transaction manager will perform recover operations on the resource. |
int |
getXARetryIntervalSeconds()
Deprecated. Determines the time in seconds between XA retry operations if the XARetryDurationSeconds attribute is set to a positive value. |
boolean |
getXASetTransactionTimeout()
Deprecated. When set to true, the WebLogic Server Transaction Manager calls XAResource.setTransactionTimeout() before calling XAResource.start, and passes either the XATransactionTimeout or the global transaction timeout in seconds. |
int |
getXATransactionTimeout()
Deprecated. Determines the number of seconds to pass as the transaction timeout value in the XAResource.setTransactionTimeout() method. |
boolean |
isConnLeakProfilingEnabled()
Deprecated. Specifies that JDBC connection leak information is gathered. |
boolean |
isConnProfilingEnabled()
Deprecated. Specifies whether the connection pool detects local transaction work left incomplete by application code, which can interfere with subsequent operations related to global (XA) transactions. |
boolean |
isCredentialMappingEnabled()
Deprecated. Returns the configured ignoreInUseConnectionsEnabled value. |
boolean |
isIgnoreInUseConnectionsEnabled()
Deprecated. Returns the configured ignoreInUseConnectionsEnabled value. |
boolean |
isRemoveInfectedConnectionsEnabled()
Deprecated. Specifies whether a connection will be removed from the connection pool when the application asks for the underlying vendor connection object. |
boolean |
isShrinkingEnabled()
Deprecated. Specifies whether the JDBC connection pool can shrink back to its initial capacity or to the current number of connections in use if it detects that connections created during increased traffic are not being used. |
boolean |
isSqlStmtProfilingEnabled()
Deprecated. Specifies whether the connection pool stores SQL statement text, execution time and other metrics. |
void |
setACLName(String name)
Deprecated. Sets the value of the ACLName attribute. |
void |
setCapacityIncrement(int capacity)
Deprecated. Sets the value of the CapacityIncrement attribute. |
void |
setConnectionCreationRetryFrequencySeconds(int seconds)
Deprecated. Sets the value of the ConnectionCreationRetryFrequencySeconds attribute. |
void |
setConnectionReserveTimeoutSeconds(int seconds)
Deprecated. The number of seconds after which a call to reserve a connection from the connection pool will timeout. |
void |
setConnLeakProfilingEnabled(boolean enable)
Deprecated. Sets the value of the ConnLeadProfilingEnabled attribute. |
void |
setConnProfilingEnabled(boolean enable)
Deprecated. Sets the value of the ConnProfilingEnabled attribute. |
void |
setCountOfRefreshFailuresTillDisable(int disable_threshold)
Deprecated. Sets the number of consecutive pool con refresh failures till we disable the pool. |
void |
setCountOfTestFailuresTillFlush(int flush_threshold)
Deprecated. Sets the number of consecutive pool con test failures till we flush the pool. |
void |
setCredentialMappingEnabled(boolean enable)
Deprecated. Enables pool to install client id for every connection reserved by the application based Credential Mapping. |
void |
setDriverName(String driverClassName)
Deprecated. Sets the value of the DriverName attribute. |
void |
setEnableResourceHealthMonitoring(boolean enable)
Deprecated. Determines whether JTA resource health monitoring is enabled for this XA connection pool. |
void |
setHighestNumUnavailable(int count)
Deprecated. Sets the value of the HighestNumUnavailable attribute. |
void |
setHighestNumWaiters(int count)
Deprecated. Sets the value of the HighestNumWaiters attribute. |
void |
setIgnoreInUseConnectionsEnabled(boolean enable)
Deprecated. Enables pool to be shutdown even if connections are still in use. |
void |
setInactiveConnectionTimeoutSeconds(int seconds)
Deprecated. Sets the value of the InactiveConnectionTimeoutSeconds attribute. |
void |
setInitialCapacity(int capacity)
Deprecated. Sets the value of the InitialCapacity attribute. |
void |
setInitSQL(String table)
Deprecated. Sets the value of the InitSQL statement. |
void |
setKeepLogicalConnOpenOnRelease(boolean b)
Deprecated. Sets the value of the KeepLogicalConnOpenOnRelease attribute. |
void |
setKeepXAConnTillTxComplete(boolean b)
Deprecated. Sets the value of the KeepXAConnTillTxComplete attribute. |
void |
setLoginDelaySeconds(int secs)
Deprecated. Sets the value of the LoginDelaySeconds attribute. |
void |
setMaxCapacity(int capacity)
Deprecated. Sets the value of the MaxCapacity attribute. |
void |
setNeedTxCtxOnClose(boolean b)
Deprecated. Sets the value of the NeedTxCtcOnClose attribute. |
void |
setNewXAConnForCommit(boolean b)
Deprecated. Sets the value of the NewXAConnForCommit attribute. |
void |
setPassword(String password)
Deprecated. Sets the password attribute passed to the JDBC driver when creating physical database connections. |
void |
setPasswordEncrypted(byte[] bytes)
Deprecated. Encrypts the password and sets the value of the PasswordEncrypted attribute. |
void |
setPreparedStatementCacheSize(int cacheSize)
Deprecated. Sets the value of the PreparedStatementCacheSize attribute. |
void |
setProperties(Properties props)
Deprecated. Sets the value of the Properties attribute. |
void |
setRefreshMinutes(int minutes)
Deprecated. Sets the value of the RefreshMinutes attribute. |
void |
setRemoveInfectedConnectionsEnabled(boolean enable)
Deprecated. Sets the value of the RemoveInfectedConnectionsEnabled attribute. |
void |
setRollbackLocalTxUponConnClose(boolean enable)
Deprecated. Sets the value of the RollbackLocalTxUponConnClose attribute. |
void |
setSecondsToTrustAnIdlePoolConnection(int secs)
Deprecated. Sets the value of the SecondsToTrustAnIdlePoolConnection attribute. |
void |
setShrinkFrequencySeconds(int seconds)
Deprecated. Sets the value of the ShrinkFrequencySeconds attribute. |
void |
setShrinkingEnabled(boolean enable)
Deprecated. Sets the value of the ShrinkingEnabled attribute. |
void |
setShrinkPeriodMinutes(int minutes)
Deprecated. Sets the value of the ShrinkPeriodMinutes attribute. |
void |
setSqlStmtProfilingEnabled(boolean enable)
Deprecated. Sets the value of the SqlStmtProfilingEnabled attribute. |
void |
setStatementCacheSize(int cacheSize)
Deprecated. Sets the value of the StatementCacheSize attribute. |
void |
setStatementCacheType(String type)
Deprecated. Sets the value of the StatementCacheType attribute. |
void |
setStatementTimeout(int timeout)
Deprecated. Sets the value of the StatementTimeout attribute. |
void |
setTestConnectionsOnCreate(boolean enable)
Deprecated. Sets the value of the TestConnectionsOnCreate attribute. |
void |
setTestConnectionsOnRelease(boolean enable)
Deprecated. Sets the value of the TestConnectionsOnRelease attribute. |
void |
setTestConnectionsOnReserve(boolean enable)
Deprecated. Sets the value of the TestConnectionsOnReserve attribute. |
void |
setTestFrequencySeconds(int seconds)
Deprecated. Specifies the value of the TestFrequencySeconds attribute. |
void |
setTestStatementTimeout(int timeout)
Deprecated. Sets the value of the TestStatementTimeout attribute. |
void |
setTestTableName(String table)
Deprecated. Sets the value of the TestTableName attribute. |
void |
setURL(String url)
Deprecated. Sets the value of the URL attribute. |
void |
setXAEndOnlyOnce(boolean b)
Deprecated. Sets the value of the XAEndOnlyOnce attribute. |
void |
setXAPassword(String password)
Deprecated. Sets the value of the XAPassword attribute. |
void |
setXAPasswordEncrypted(byte[] bytes)
Deprecated. Encrypts the password and sets the value of the XAPasswordEncrypted attribute. |
void |
setXAPreparedStatementCacheSize(int size)
Deprecated. Sets the value of the XAPreparedStatementCacheSize attribute. |
void |
setXARetryDurationSeconds(int duration)
Deprecated. Determines the duration in seconds for which the transaction manager will perform recover operations on the resource. |
void |
setXARetryIntervalSeconds(int interval)
Deprecated. Determines the time in seconds between XA retry operations if the XARetryDurationSeconds attribute is set to a positive value. |
void |
setXASetTransactionTimeout(boolean b)
Deprecated. Sets the value of the XASetTransactionTimeout attribute. |
void |
setXATransactionTimeout(int timeout)
Deprecated. Sets the value of the XATransactionTimeout attribute. |
Methods inherited from interface weblogic.management.configuration.DeploymentMBean |
---|
addTarget, getDeploymentOrder, getTargets, removeTarget, setDeploymentOrder, setTargets |
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean |
---|
freezeCurrentValue, getName, getNotes, isSet, restoreDefaultValue, setComments, setDefaultedMBean, setName, setNotes, setPersistenceEnabled, unSet |
Method Detail |
---|
void setConnLeakProfilingEnabled(boolean enable) throws InvalidAttributeValueException
Sets the value of the ConnLeadProfilingEnabled attribute.
enable
- The new connLeakProfilingEnabled value
InvalidAttributeValueException
#isConnLeadProfilingEnabled
boolean isConnLeakProfilingEnabled()
Specifies that JDBC connection leak information is gathered. This option is required to view leaked connections from the connection pool.
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 connection pool will store the stack trace at the time the Connection object is allocated from the connection 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 slow down connection pool operations, so it is not recommended for production use.
void setConnProfilingEnabled(boolean enable) throws InvalidAttributeValueException
Sets the value of the ConnProfilingEnabled attribute.
enable
- The new connProfilingEnabled value
InvalidAttributeValueException
JDBCConnectionPoolMBean.isConnProfilingEnabled()
boolean isConnProfilingEnabled()
Specifies whether the connection pool detects local transaction work left incomplete by application code, which can interfere with subsequent operations related to global (XA) transactions.
When connection profiling is active, the pool will store the stack trace at the time the connection object is released back into the pool by the client. If an exception is thrown during a subsequent operation related to global (XA) transactions, 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.
boolean isSqlStmtProfilingEnabled()
Specifies whether the connection pool stores SQL statement text, execution time and other metrics.
This is a resource-consuming feature, so it's recommended that it's turned off on a production server.
true
if JDBC SQL roundtrip profiling enabled
void setSqlStmtProfilingEnabled(boolean enable) throws InvalidAttributeValueException
Sets the value of the SqlStmtProfilingEnabled attribute.
enable
- The new sqlStmtProfilingEnabled value
InvalidAttributeValueException
JDBCConnectionPoolMBean.isSqlStmtProfilingEnabled()
String getACLName()
The access control list (ACL) used to control access to this connection pool.
Permissions available to this ACL are:
Reserve
Allows users to get logical connections from this connection pool.
Admin
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).
void setACLName(String name) throws InvalidAttributeValueException
Sets the value of the ACLName attribute.
name
- The new aCLName value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getACLName()
String getURL()
The URL of the database to connect to. The format of the URL varies by JDBC driver.
The URL is passed to the JDBC driver to create the physical database connections.
void setURL(String url) throws InvalidAttributeValueException
Sets the value of the URL attribute.
url
- The new uRL value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getURL()
String getDriverName()
The full package name of JDBC driver class used to create the physical database connections in the connection pool. (Note that this driver class must be in the classpath of any server to which it is deployed.)
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.
void setDriverName(String driverClassName) throws InvalidAttributeValueException
Sets the value of the DriverName attribute.
driverClassName
- The new driverName value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getDriverName()
Properties getProperties()
The list of properties passed to the JDBC driver that are used to create physical database connections. List each property=value pair on a separate line.
For example: server=dbserver1.
The list consists of attribute=value tags, separated by
semi-colons. For example user=scott;server=myDB
.
Note: Oracle recommends that you do not store
passwords in this properties list. Instead, store them in
PasswordEncrypted
so that the value is encrypted in
config.xml
and in the Administration Console
display.
JDBCConnectionPoolMBean.getPasswordEncrypted()
void setProperties(Properties props) throws InvalidAttributeValueException
Sets the value of the Properties attribute.
props
- The new properties value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getProperties()
int getLoginDelaySeconds()
The number of seconds to delay before creating each physical database connection.
This delay supports database servers that cannot handle multiple requests for connections in rapid succession
The delay takes place both during initial pool creation and during the lifetime of the pool whenever a physical database connection is created.
void setLoginDelaySeconds(int secs) throws InvalidAttributeValueException
Sets the value of the LoginDelaySeconds attribute.
secs
- The new loginDelaySeconds value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getLoginDelaySeconds()
int getSecondsToTrustAnIdlePoolConnection()
The number of seconds within the use of a pooled connection that WebLogic Server trusts that the connection is still viable and will skip connection testing.
If an application requests a connection within the time specified since the connection was tested or successfully used and returned to the connection pool, WebLogic Server skips the connection test before delivering it to an application (if TestConnectionsOnReserve is enabled).
WebLogic Server also skips the automatic refresh connection test if the connection was successfully used and returned to the connection pool within the time specified (if TestFrequencySeconds is specified).
SecondsToTrustAnIdlePoolConnection is a tuning feature that can improve application performance by minimizing the delay caused by database connection testing, especially during heavy traffic. However, it can reduce the effectiveness of connection testing, especially if the value is set too high. The appropriate value depends on your environment and the likelihood that a connection will become defunct.
void setSecondsToTrustAnIdlePoolConnection(int secs) throws InvalidAttributeValueException
Sets the value of the SecondsToTrustAnIdlePoolConnection attribute.
secs
- The new secondsToTrustAnIdlePoolConnection value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getSecondsToTrustAnIdlePoolConnection()
int getInitialCapacity()
The number of physical database connections to create when creating this JDBC 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.
void setInitialCapacity(int capacity) throws InvalidAttributeValueException
Sets the value of the InitialCapacity attribute.
capacity
- The new initialCapacity value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getInitialCapacity()
int getMaxCapacity()
The maximum number of physical database connections that this JDBC connection pool can contain.
Different JDBC Drivers and database servers may limit the number of possible physical connections.
void setMaxCapacity(int capacity) throws InvalidAttributeValueException
Sets the value of the MaxCapacity attribute.
capacity
- The new maxCapacity value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getMaxCapacity()
int getCapacityIncrement()
The increment by which this JDBC connection pool's 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.
JDBCConnectionPoolMBean.getMaxCapacity()
void setCapacityIncrement(int capacity) throws InvalidAttributeValueException
Sets the value of the CapacityIncrement attribute.
capacity
- The new capacityIncrement value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getCapacityIncrement()
boolean isShrinkingEnabled()
Specifies whether the JDBC connection pool can shrink back to its initial capacity or to the current number of connections in use if it detects 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.
void setShrinkingEnabled(boolean enable) throws InvalidAttributeValueException
Sets the value of the ShrinkingEnabled attribute.
enable
- The new shrinkingEnabled value
InvalidAttributeValueException
JDBCConnectionPoolMBean.isShrinkingEnabled()
int getShrinkPeriodMinutes()
The number of minutes to wait before shrinking a connection pool that has incrementally increased to meet demand. (Requires that you enable connection pool shrinking.)
JDBCConnectionPoolMBean.isShrinkingEnabled()
void setShrinkPeriodMinutes(int minutes) throws InvalidAttributeValueException
Sets the value of the ShrinkPeriodMinutes attribute.
minutes
- The new shrinkPeriodMinutes value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getShrinkPeriodMinutes()
int getShrinkFrequencySeconds()
The number of seconds before WebLogic Server shrinks the connection pool to the original number of connections or number of connections currently in use. (Requires that you enable connection pool shrinking.)
void setShrinkFrequencySeconds(int seconds) throws InvalidAttributeValueException
Sets the value of the ShrinkFrequencySeconds attribute.
seconds
- The new shrinkFrequencySeconds value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getShrinkFrequencySeconds()
int getRefreshMinutes()
The number of minutes between database connection tests. (Requires that you specify a Test Table Name.)
At the specified interval, unused database connections are tested. Connections that do not pass the test will be closed and reopened to re-establish a valid physical database connection.
JDBCConnectionPoolMBean.getTestTableName()
void setRefreshMinutes(int minutes) throws InvalidAttributeValueException
Sets the value of the RefreshMinutes attribute.
minutes
- The new refreshMinutes value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getRefreshMinutes()
int getTestFrequencySeconds()
The number of seconds between when WebLogic Server tests unused database connections. (Requires that you specify a Test Table Name.)
Connections that fail the test are closed and reopened to re-establish a valid physical database connection. If the test fails again, the connection is closed.
When set to 0
, periodic testing is disabled.
JDBCConnectionPoolMBean.getTestTableName()
,
JDBCConnectionPoolMBean.setHighestNumUnavailable(int)
void setTestFrequencySeconds(int seconds) throws InvalidAttributeValueException
Specifies the value of the TestFrequencySeconds attribute.
seconds
- The new testFrequencySeconds value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getTestFrequencySeconds()
String getTestTableName()
The name of the database table to use when testing physical database connections. This name is required when you specify a Test Frequency and enable Test Reserved Connections, Test Created Connections, and Test Released Connections.
The default SQL code used to test a connection is
"select count(*) from TestTableName"
Most database servers optimize this SQL to avoid a table scan, but it is still a good idea to set the Test Table Name to the name of a table that is known to have few rows, or even no rows.
If the name 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.
void setTestTableName(String table) throws InvalidAttributeValueException
Sets the value of the TestTableName attribute.
table
- The new testTableName value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getTestTableName()
void setTestConnectionsOnReserve(boolean enable) throws InvalidAttributeValueException
Sets the value of the TestConnectionsOnReserve attribute.
enable
- The new testConnectionsOnReserve value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getTestConnectionsOnReserve()
boolean getTestConnectionsOnReserve()
Specifies whether WebLogic Server tests a connection before giving it to the client. This test is required for connection pools used within a MultiPool that use the High Availability algorithm. (Requires that you specify a Test Table Name.)
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).
JDBCConnectionPoolMBean.getTestTableName()
void setTestConnectionsOnRelease(boolean enable) throws InvalidAttributeValueException
Sets the value of the TestConnectionsOnRelease attribute.
enable
- The new testConnectionsOnRelease value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getTestConnectionsOnRelease()
boolean getTestConnectionsOnRelease()
Specifies whether WebLogic Server tests a connection before returning it to this JDBC connection pool. (Requires that you specify a Test Table Name.)
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.
JDBCConnectionPoolMBean.getTestTableName()
void setTestConnectionsOnCreate(boolean enable) throws InvalidAttributeValueException
Sets the value of the TestConnectionsOnCreate attribute.
enable
- The new testConnectionsOnCreate value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getTestConnectionsOnCreate()
boolean getTestConnectionsOnCreate()
Specifies whether WebLogic Server tests a connection after creating it but before adding it to the list of connections available in the pool. (Requires that you specify a Test Table Name.)
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).
JDBCConnectionPoolMBean.getTestTableName()
String getPassword()
The database password.
The value of this attribute can be set indirectly by passing
it as a key=value pair by passing it to the MBean server's
setAttribute
method for the
Properties
attribute. However, Oracle recommends that
you set the value directly by passing it to the MBean server's
setAttribute
method for this
(PasswordEncrypted
) attribute.
When you set the value of this attribute, WebLogic Server does the following:
PasswordEncrypted
attribute to the
encrypted value.Using this Password
attribute is a potential security risk because
the String object (which contains the unencrypted password) remains in
the JVM's memory until garbage collection removes it and the memory is reallocated. Depending on how
memory is allocated in the JVM, a significant amount of time could pass
before this unencrypted data is removed from memory.
Instead of using this attribute, use PasswordEncrypted
.
JDBCConnectionPoolMBean.getProperties()
,
JDBCConnectionPoolMBean.getPasswordEncrypted()
void setPassword(String password) throws InvalidAttributeValueException
Sets the password attribute passed to the JDBC driver when
creating physical database connections. This value overrides any
password that you 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
.
password
- The new password value
InvalidAttributeValueException
byte[] getPasswordEncrypted()
The encrypted database password.
The value of this attribute can be set indirectly by passing
it as a key=value pair by passing it to the MBean server's
setAttribute
method for the
Properties
attribute. However, Oracle recommends that
you set the value directly by using
weblogic.management.EncryptionHelper.encrypt()
to encrypt the value. Then set this attribute to the output of the
encrypt() method. Doing so overrides the corresponding key=value
pair in Properties
if you set one.
To compare a password that a user enters with the encrypted
value of this attribute, go to the same WebLogic Server instance
that you used to set and encrypt this attribute
and use weblogic.management.EncryptionHelper.encrypt()
to encrypt the user-supplied password. Then compare the encrypted values.
void setPasswordEncrypted(byte[] bytes) throws InvalidAttributeValueException
Encrypts the password and sets the value of the PasswordEncrypted attribute.
bytes
- The new password value as a byte array.
InvalidAttributeValueException
JDBCConnectionPoolMBean.getPasswordEncrypted()
String getXAPassword()
The password that is used to create physical XA database connections.
The value of this attribute can be set indirectly by passing
it as a key=value pair by passing it to the MBean server's
setAttribute
method for the
Properties
attribute. However, Oracle recommends that
you set the value directly by passing it to the MBean server's
setAttribute
method for this
(XAPassword
) attribute.
When you set the value of this attribute, WebLogic Server does the following:
XAPasswordEncrypted
attribute to the
encrypted value.Using this XAPassword
attribute is a potential security risk because
the String object (which contains the unencrypted password) remains in
the JVM's memory until garbage collection removes it and the memory is reallocated. Depending on how
memory is allocated in the JVM, a significant amount of time could pass
before this unencrypted data is removed from memory.
Instead of using this attribute, use XAPasswordEncrypted
.
JDBCConnectionPoolMBean.getProperties()
,
JDBCConnectionPoolMBean.getXAPasswordEncrypted()
void setXAPassword(String password) throws InvalidAttributeValueException
password
- The new xAPassword value
InvalidAttributeValueException
byte[] getXAPasswordEncrypted()
The password that is used to create physical XA database connections.
The value of this attribute can be set indirectly by passing
it as a key=value pair by passing it to the MBean server's
setAttribute
method for the
Properties
attribute. However, Oracle recommends that
you set the value directly by using
weblogic.management.EncryptionHelper.encrypt()
to encrypt the value. Then set this attribute to the output of the
encrypt() method. Doing so overrides the corresponding key=value
pair in Properties
if you set one. It also causes
WebLogic Server to encrypt the value and set the attribute to
the encrypted value.
To compare a password that a user enters with the encrypted
value of this attribute, go to the same WebLogic Server instance
that you used to set and encrypt this attribute
and use weblogic.management.EncryptionHelper.encrypt()
to encrypt the user-supplied password. Then compare the encrypted values.
void setXAPasswordEncrypted(byte[] bytes) throws InvalidAttributeValueException
bytes
- The new xAPassword value as a byte array.
InvalidAttributeValueException
JDBCConnectionPoolMBean.getXAPasswordEncrypted()
boolean getKeepXAConnTillTxComplete()
Specifies whether the XA connection pool associates the same XA connection with the distributed transaction until the transaction completes. Only applies to connection pools that use an XA driver.
Use this setting to work around specific problems with third party vendor's XA driver.
void setKeepXAConnTillTxComplete(boolean b) throws InvalidAttributeValueException
Sets the value of the KeepXAConnTillTxComplete attribute.
b
- The new keepXAConnTillTxComplete value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getKeepXAConnTillTxComplete()
boolean getNeedTxCtxOnClose()
Specifies whether the XA driver requires a distributed transaction context when closing various JDBC objects (result sets, statements, connections, and so on). Only applies to connection pools that use an XA driver.
When enabled, SQL exceptions that are thrown while closing the JDBC objects in no transaction context will be swallowed.
Use this setting to work around specific problems with third party vendor's XA driver.
void setNeedTxCtxOnClose(boolean b) throws InvalidAttributeValueException
Sets the value of the NeedTxCtcOnClose attribute.
b
- The new needTxCtxOnClose value
InvalidAttributeValueException
#getNeedTxCtcOnClose
boolean getXAEndOnlyOnce()
Specifies that XAResource.end() is called only once for each pending XAResource.start(). The XA driver will not call XAResource.end(TMSUSPEND), XAResource.end(TMSUCCESS) successively. Only applies to connection pools that use an XA driver.
Use this setting to work around specific problems with third party vendor's XA driver.
void setXAEndOnlyOnce(boolean b) throws InvalidAttributeValueException
Sets the value of the XAEndOnlyOnce attribute.
b
- The new xAEndOnlyOnce value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getXAEndOnlyOnce()
boolean getNewXAConnForCommit()
Specifies whether a dedicated XA connection is used for commit/rollback processing of a particular distributed transaction. Only applies to connection pools that use an XA driver.
Use this setting to work around specific problems with third party vendor's XA driver.
void setNewXAConnForCommit(boolean b) throws InvalidAttributeValueException
Sets the value of the NewXAConnForCommit attribute.
b
- The new newXAConnForCommit value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getNewXAConnForCommit()
boolean getKeepLogicalConnOpenOnRelease()
Specifies whether the logical JDBC connection is kept open when the physical XA connection is returned to the XA connection pool. Only applies to connection pools that use an XA driver.
Select this option if the XA driver used to create database connections or the DBMS requires that a logical JDBC connection be kept open while transaction processing continues (although the physical XA connection can returned to the XA connection pool).
Use this setting to work around specific problems with third party vendor's XA driver.
void setKeepLogicalConnOpenOnRelease(boolean b) throws InvalidAttributeValueException
Sets the value of the KeepLogicalConnOpenOnRelease attribute.
b
- The new keepLogicalConnOpenOnRelease value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getKeepLogicalConnOpenOnRelease()
int getXAPreparedStatementCacheSize()
The maximum number of prepared statements cached by this particular XA connection pool. Only applies to connection pools that use an XA driver.
If set to 0
, caching is turned off.
void setXAPreparedStatementCacheSize(int size) throws InvalidAttributeValueException
Sets the value of the XAPreparedStatementCacheSize attribute.
size
- The new xAPreparedStatementCacheSize value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getXAPreparedStatementCacheSize()
boolean getEnableResourceHealthMonitoring()
This property applies to XA connection pools only, and is ignored for connection pools that use a non-XA driver.
void setEnableResourceHealthMonitoring(boolean enable) throws InvalidAttributeValueException
This property applies to XA connection pools only, and is ignored for connection pools that use a non-XA driver.
enable
- The new enableResourceHealthMonitoring value
InvalidAttributeValueException
boolean getXASetTransactionTimeout()
When set to true, the WebLogic Server Transaction Manager calls XAResource.setTransactionTimeout() before calling XAResource.start, and passes either the XATransactionTimeout or the global transaction timeout in seconds.
When set to false, the Transaction Manager does not call setTransactionTimeout().
This property applies to XA connection pools only, and is ignored for connection pools that use a non-XA driver.
void setXASetTransactionTimeout(boolean b) throws InvalidAttributeValueException
Sets the value of the XASetTransactionTimeout attribute.
InvalidAttributeValueException
JDBCConnectionPoolMBean.getXASetTransactionTimeout()
int getXATransactionTimeout()
Determines the number of seconds to pass as the transaction timeout value in the XAResource.setTransactionTimeout() method. When this property is set to 0, the WebLogic Server Transaction Manager passes the global WebLogic Server transaction timeout in seconds in the method.
If set, this value should be greater than or equal to the global WebLogic Server transaction timeout.
XASetTransactionTimeout must be set to "true" or this property is ignored.
This property applies to XA connection pools only, and is ignored for connection pools that use a non-XA driver.
void setXATransactionTimeout(int timeout) throws InvalidAttributeValueException
Sets the value of the XATransactionTimeout attribute.
InvalidAttributeValueException
JDBCConnectionPoolMBean.getXATransactionTimeout()
int getXARetryDurationSeconds()
void setXARetryDurationSeconds(int duration) throws InvalidAttributeValueException
InvalidAttributeValueException
int getXARetryIntervalSeconds()
void setXARetryIntervalSeconds(int interval) throws InvalidAttributeValueException
InvalidAttributeValueException
void setPreparedStatementCacheSize(int cacheSize)
Sets the value of the PreparedStatementCacheSize attribute.
cacheSize
- The new preparedStatementCacheSize valueJDBCConnectionPoolMBean.getPreparedStatementCacheSize()
int getPreparedStatementCacheSize()
The number of prepared statements stored in the cache. (This might increase server performance.)
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.
void setConnectionReserveTimeoutSeconds(int seconds)
The number of seconds after which a call to reserve a connection from the connection pool will timeout.
When set to 0
, a call will never timeout.
When set to -1
, a call will timeout immediately.
seconds
- The new connectionReserveTimeoutSeconds valueJDBCConnectionPoolMBean.getConnectionReserveTimeoutSeconds()
int getConnectionReserveTimeoutSeconds()
The number of seconds after which a call to reserve a connection from the connection pool will timeout.
When set to 0, a call will never timeout.
When set to -1, a call will timeout immediately.
JDBCConnectionPoolMBean.getHighestNumWaiters()
void setConnectionCreationRetryFrequencySeconds(int seconds)
Sets the value of the ConnectionCreationRetryFrequencySeconds attribute.
seconds
- The new connectionCreationRetryFrequencySeconds valueJDBCConnectionPoolMBean.getConnectionCreationRetryFrequencySeconds()
int getConnectionCreationRetryFrequencySeconds()
The number of seconds between when the connection pool retries to establish connections to the database. Do not enable connection retries for connection pools included in a High Availability MultiPool.
If you do not set this value, connection pool creation fails if the database is unavailable. If set and if the database is unavailable when the connection pool is created, WebLogic Server will attempt to create connections in the pool again after the number of seconds you specify, and will continue to attempt to create the connections until it succeeds.
Note: Do not enable connection creation retries for connection pools included in a High Availability MultiPool. Connection requests to the MultiPool will fail (not fail-over) when a connection pool in the list is dead and the number of connection requests equals the number of connections in the first connection pool, even if connections are available in subsequent connection pools in the MultiPool.
When set to 0
, connection retry is disabled.
void setInactiveConnectionTimeoutSeconds(int seconds)
Sets the value of the InactiveConnectionTimeoutSeconds attribute.
seconds
- The new inactiveConnectionTimeoutSeconds valueJDBCConnectionPoolMBean.getInactiveConnectionTimeoutSeconds()
int getInactiveConnectionTimeoutSeconds()
The number of inactive seconds on a reserved connection before WebLogic Server reclaims the connection and releases it back into the connection pool.
When set to 0
, the feature is disabled.
void setHighestNumWaiters(int count)
Sets the value of the HighestNumWaiters attribute.
count
- The new highestNumWaiters valueJDBCConnectionPoolMBean.getHighestNumWaiters()
int getHighestNumWaiters()
The maximum number of connection requests that can concurrently block threads while waiting to reserve a connection from the connection pool.
JDBCConnectionPoolMBean.getConnectionReserveTimeoutSeconds()
void setHighestNumUnavailable(int count)
Sets the value of the HighestNumUnavailable attribute.
count
- The new highestNumUnavailable valueJDBCConnectionPoolMBean.getHighestNumUnavailable()
int getHighestNumUnavailable()
The maximum number of connections in the connection pool that can be made unavailable for use by an application. Connections become unavailable while being tested or refreshed.
Note that in cases likes the back end system being unavailable, this specified value could be exceeded due to factors outside the pool's control.
When set to 0
, this feature is disabled.
void setInitSQL(String table) throws InvalidAttributeValueException
Sets the value of the InitSQL statement.
table
- The new initSQL value
InvalidAttributeValueException
JDBCConnectionPoolMBean.getInitSQL()
String getInitSQL()
SQL statement to execute that will initialize a newly created physical connection. Start the statement with SQL followed by a space.
If the statement 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.
Else, the statement will be treated as the name of a table and the
following SQL statement will be used to initialize a connection:
"select count(*) from InitSQL"
The table InitSQL
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 InitSQL
to the name of a table that is
known to have few rows, or even no rows.
void setStatementCacheSize(int cacheSize)
Sets the value of the StatementCacheSize attribute.
cacheSize
- The new statementCacheSize valueJDBCConnectionPoolMBean.getStatementCacheSize()
int getStatementCacheSize()
The number of prepared and callable statements stored in the cache. (This might increase server performance.)
WebLogic Server can reuse statements in the cache without reloading them, which can increase server performance. Each connection in the pool has its own cache of statements.
Setting the size of the statement cache to 0 turns it off.
void setStatementCacheType(String type)
Sets the value of the StatementCacheType attribute.
type
- The new statementCacheType valueJDBCConnectionPoolMBean.getStatementCacheType()
String getStatementCacheType()
The algorithm used for maintaining the prepared statements stored in the cache.
Connection pools support the following cache types:
replaces the least recently used statements when new statements are used.
keeps the first fixed number of statements in the cache.
void setRemoveInfectedConnectionsEnabled(boolean enable)
Sets the value of the RemoveInfectedConnectionsEnabled attribute.
enable
- The new removeInfectedConnectionsEnabled valueJDBCConnectionPoolMBean.isRemoveInfectedConnectionsEnabled()
boolean isRemoveInfectedConnectionsEnabled()
Specifies whether a connection will be removed from the connection pool when the application asks for the underlying vendor connection object.
If you use this setting, you must make sure that the database connection is suitable for reuse by other applications.
When enabled, the physical connection is not returned to the connection pool after the application closes the logical connection. Instead, the physical connection is closed and recreated.
When not enabled, when you close the logical connection, the physical connection is returned to the connection pool.
WLConnection
void setRollbackLocalTxUponConnClose(boolean enable)
Sets the value of the RollbackLocalTxUponConnClose attribute.
enable
- The new rollbackLocalTxUponConnClose valueJDBCConnectionPoolMBean.getRollbackLocalTxUponConnClose()
boolean getRollbackLocalTxUponConnClose()
Specifies whether the WLS connection pool will call
rollback()
on the connection before putting it back in
the pool.
Enabling this attribute will have a performance impact as the rollback call requires communication with the database server.
void setTestStatementTimeout(int timeout)
Sets the value of the TestStatementTimeout attribute.
timeout
- The new testStatementTimeout valueJDBCConnectionPoolMBean.getTestStatementTimeout()
int getTestStatementTimeout()
The time after which the test statement (configured by applications using the pool attribute Test Table Name) or initialization statement (configured by applications using the pool attribute InitSQL) currently being executed will be timed out.
Efficacy of this feature relies on underlying JDBC driver
support. WebLogic Server passes the time specified to the JDBC driver
using the java.sql.Statement.setQueryTimeout()
method.
If your JDBC driver does not support this method, it may throw an exception
and the timeout value is ignored.
A value of -1
disables this feature.
A value of 0
means that statements will not time out.
JDBCConnectionPoolMBean.getTestTableName()
,
JDBCConnectionPoolMBean.getInitSQL()
void setStatementTimeout(int timeout)
Sets the value of the StatementTimeout attribute.
timeout
- The new statementTimeout valueJDBCConnectionPoolMBean.getStatementTimeout()
int getStatementTimeout()
The time after which a statement currently being executed will be timed-out.
Efficacy of this feature relies on underlying JDBC driver
support. WebLogic Server passes the time specified to the JDBC driver
using the java.sql.Statement.setQueryTimeout()
method.
If your JDBC driver does not support this method, it may throw an exception
and the timeout value is ignored.
A value of -1
disables this feature.
A value of 0
means that statements will not time out.
void setIgnoreInUseConnectionsEnabled(boolean enable)
enable
- The new ignoreInUseConnectionsEnabled value
boolean isIgnoreInUseConnectionsEnabled()
void setCredentialMappingEnabled(boolean enable)
the
- credentialMappingEnabled value
boolean isCredentialMappingEnabled()
void setCountOfTestFailuresTillFlush(int flush_threshold)
Sets the number of consecutive pool con test failures till we flush the pool.
flush_threshold
- The flush_threshold valueJDBCConnectionPoolMBean.getCountOfTestFailuresTillFlush()
int getCountOfTestFailuresTillFlush()
The number of consecutive pool con test failures till we flush the pool.
If a pool temporarily loses DBMS connectivity, all the connections are probably dead. It is much faster to close them all, rather than have the pool test each one during a reserve, and then replace it. This setting tells the pool to flush all the connections in the pool after N consecutive times finding that a connection being tested is dead.
Setting the count to zero means we will not flush.
void setCountOfRefreshFailuresTillDisable(int disable_threshold)
Sets the number of consecutive pool con refresh failures till we disable the pool.
disable_threshold
- The disable_threshold value#getCountOfRefreshFaluresTillDisable
int getCountOfRefreshFailuresTillDisable()
The number of consecutive pool con refresh failures till we disable the pool.
If a pool loses DBMS connectivity, all the connections are dead and we won't be able to replace them till the DBMS is back. Applications that continue to ask the pool for connections will suffer slowness while the pool tries in vain to test dead connections and tries in vain to make a new one. Sometiimes this can take minutes. This setting tells the pool to disable itself so the applications will at least get a quick failure response, and if a multipool is involved, it can fail over to the next pool quickly. The self-disabled pool will periodically try to reconnect, and will re-enable itself asap.
Setting the count to zero means we will not disable.
|
Documentation is available at http://download.oracle.com/docs/cd/E12839_01/web.1111/wls.htm Copyright 1996, 2009, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Oracle WebLogic Server 10.3.1 MBean API Reference 11g Release 1 (10.3.1) Part Number E13945-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |