|
Oracle® Universal Connection Pool for JDBC Java API Reference 11g Release 2 (11.2.0.4) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PoolDataSource
A connection pool-aware data source interface.
PoolDataSource
uses Universal Connection Pool internally. See setters for pool properties
and their default values.
UniversalConnectionPool
Field Summary
static java.lang.StringUCP_ABANDONED_CONNECTION_TIMEOUT
static java.lang.StringUCP_CONNECTION_FACTORY_CLASS_NAME
static java.lang.StringUCP_CONNECTION_FACTORY_PROPERTIES
static java.lang.StringUCP_CONNECTION_HARVEST_MAX_COUNT
static java.lang.StringUCP_CONNECTION_HARVEST_TRIGGER_COUNT
static java.lang.StringUCP_CONNECTION_POOL_NAME
static java.lang.StringUCP_CONNECTION_PROPERTIES
static java.lang.StringUCP_CONNECTION_WAIT_TIMEOUT
static java.lang.StringUCP_DATA_SOURCE_NAME
static java.lang.StringUCP_DATABASE_NAME
static java.lang.StringUCP_DESCRIPTION
static java.lang.StringUCP_FAST_CONNECTION_FAILOVER_ENABLED
static java.lang.StringUCP_INACTIVE_CONNECTION_TIMEOUT
static java.lang.StringUCP_INITIAL_POOL_SIZE
static java.lang.StringUCP_MAX_CONNECTION_REUSE_COUNT
static java.lang.StringUCP_MAX_CONNECTION_REUSE_TIME
static java.lang.StringUCP_MAX_IDLE_TIME
static java.lang.StringUCP_MAX_POOL_SIZE
static java.lang.StringUCP_MAX_STATEMENTS
static java.lang.StringUCP_MIN_POOL_SIZE
static java.lang.StringUCP_NETWORK_PROTOCOL
static java.lang.StringUCP_NTH_RETURNED_CONNECTION_TO_VALIDATE
static java.lang.StringUCP_ONS_CONFIGURATION
static java.lang.StringUCP_PASSWORD
static java.lang.StringUCP_PORT_NUMBER
static java.lang.StringUCP_PROPERTY_CYCLE
static java.lang.StringUCP_ROLE_NAME
static java.lang.StringUCP_SERVER_NAME
static java.lang.StringUCP_SQL_FOR_VALIDATE_CONNECTION
static java.lang.StringUCP_TIME_TO_LIVE_CONNECTION_TIMEOUT
static java.lang.StringUCP_TIMEOUT_CHECK_INTERVAL
static java.lang.StringUCP_URL
static java.lang.StringUCP_USER
static java.lang.StringUCP_VALIDATE_CONNECTION_ON_BORROW
Method Summary
intgetAbandonedConnectionTimeout()
Gets the abandoned connection timeout value.
intgetAvailableConnectionsCount()
Gets the number of available connections in the pool.
intgetBorrowedConnectionsCount()
Gets the number of borrowed connections from the pool.
java.sql.ConnectiongetConnection(java.util.Properties labels)
Attempts to obtain a database connection with the requested
connection labels.
java.sql.ConnectiongetConnection(java.lang.String username,
java.lang.String password,
java.util.Properties labels)
Attempts to obtain a database connection with the requested
connection labels.
java.lang.StringgetConnectionFactoryClassName()
Gets the Connection Factory class name.
java.util.PropertiesgetConnectionFactoryProperties()
Gets the connection factory properties that are set on this
data source.
java.lang.StringgetConnectionFactoryProperty(java.lang.String propertyName)
Gets the specified connection factory property that are set on
this data source.
intgetConnectionHarvestMaxCount()
Gets the maximum number of connections that may be harvested when the
connection harvesting occurs.
intgetConnectionHarvestTriggerCount()
Gets the number of available connections below which the connection
pool's connection harvesting will occur.
java.lang.StringgetConnectionPoolName()
Gets the connection pool name.
java.util.PropertiesgetConnectionProperties()
Gets the connection properties that are set on this data source.
java.lang.StringgetConnectionProperty(java.lang.String propertyName)
Gets the specified connection property that are set on
this data source.
intgetConnectionWaitTimeout()
Gets the amount of time to wait (in seconds) for a used connection to
be released by a client.
java.lang.StringgetDatabaseName()
Gets the database name.
java.lang.StringgetDataSourceName()
Gets the data source name.
java.lang.StringgetDescription()
Gets the data source description.
booleangetFastConnectionFailoverEnabled()
Checks if Fast Connection Failover is enabled.
intgetInactiveConnectionTimeout()
Gets the inactive connection timeout.
intgetInitialPoolSize()
Gets the initial pool size.
intgetMaxConnectionReuseCount()
Gets the maximum connection reuse count property value.
longgetMaxConnectionReuseTime()
Gets the maximum connection reuse time property value.
intgetMaxIdleTime()
Gets the maximum idle time.
intgetMaxPoolSize()
Gets the maximum number of connections that the connection pool will
maintain.
intgetMaxStatements()
Gets the maximum number of statements that may be pooled or cached on a
Connection.
intgetMinPoolSize()
Gets the minimum number of connections that the connection pool will
maintain.
java.lang.StringgetNetworkProtocol()
Gets the data source network protocol.
java.lang.StringgetONSConfiguration()
Returns the ONS configuration string that is used for remote ONS
subscription in the form specified in
setONSConfiguration(String).
java.lang.StringgetPassword()
Gets the Password for this data source.
intgetPortNumber()
Gets the database port number.
intgetPropertyCycle()
Gets the property cycle in seconds.
java.lang.StringgetRoleName()
Gets the data source role name.
java.lang.StringgetServerName()
Gets the database server name.
java.lang.StringgetSQLForValidateConnection()
Gets the value of the SQLForValidateConnection property.
JDBCConnectionPoolStatisticsgetStatistics()
Gets the statistics of the connection pool.
intgetTimeoutCheckInterval()
Gets the timeout check interval (in seconds).
intgetTimeToLiveConnectionTimeout()
Gets the maximum time (in seconds) a connection may remain in-use.
java.lang.StringgetURL()
Gets the URL for this data source.
java.lang.StringgetUser()
Gets the user name for this data source.
booleangetValidateConnectionOnBorrow()
Returns whether or not a connection being borrowed should first be
validated.
voidregisterConnectionAffinityCallback(ConnectionAffinityCallback cbk)
Registers a connection affinity callback on the connection pool.
voidregisterConnectionLabelingCallback(ConnectionLabelingCallback cbk)
Registers a connection labeling callback with the underlying
connection pool.
voidremoveConnectionAffinityCallback()
Removes the ConnectionAffinityCallback object registered on
the connection pool.
voidremoveConnectionLabelingCallback()
Removes the ConnectionLabelingCallback object registered with the
underlying connection pool, if any.
voidsetAbandonedConnectionTimeout(int abandonedConnectionTimeout)
Sets the abandoned connection timeout.
voidsetConnectionFactoryClassName(java.lang.String factoryClassName)
Sets the Connection Factory class name.
voidsetConnectionFactoryProperties(java.util.Properties factoryProperties)
Sets the connection factory properties on the connection factory.
voidsetConnectionFactoryProperty(java.lang.String name,
java.lang.String value)
Sets a connection factory property on the connection factory.
voidsetConnectionHarvestMaxCount(int connectionHarvestMaxCount)
Sets the maximum number of connections that may be harvested when the
connection harvesting occurs.
voidsetConnectionHarvestTriggerCount(int connectionHarvestTriggerCount)
Sets the number of available connections below which the connection
pool's connection harvesting will occur.
voidsetConnectionPoolName(java.lang.String connectionpoolName)
Sets the connection pool name.
voidsetConnectionProperties(java.util.Properties connectionProperties)
Sets the connection properties on the connection factory.
voidsetConnectionProperty(java.lang.String name,
java.lang.String value)
Sets a connection property on the connection factory.
voidsetConnectionWaitTimeout(int waitTimeout)
Sets the amount of time to wait (in seconds) for a used connection to
be released by a client.
voidsetDatabaseName(java.lang.String databaseName)
Sets the database name.
voidsetDataSourceName(java.lang.String dataSourceName)
Sets the data source name.
voidsetDescription(java.lang.String description)
Sets the data source description.
voidsetFastConnectionFailoverEnabled(boolean failoverEnabled)
Enables Fast Connection Failover (FCF) for the connection pool accessed
using this pool-enabled data source.
voidsetInactiveConnectionTimeout(int inactivityTimeout)
Sets the inactive connection timeout.
voidsetInitialPoolSize(int initialPoolSize)
Sets the initial pool size.
voidsetMaxConnectionReuseCount(int maxConnectionReuseCount)
Sets the maximum connection reuse count property.
voidsetMaxConnectionReuseTime(long maxConnectionReuseTime)
Sets the maximum connection reuse time property.
voidsetMaxIdleTime(int idleTime)
Sets the maximum idle time for available connections in the pool.
voidsetMaxPoolSize(int maxPoolSize)
Sets the maximum number of connections.
voidsetMaxStatements(int maxStatements)
Sets the maximum number of statements that may be pooled or cached on
a connection.
voidsetMinPoolSize(int minPoolSize)
Sets the minimum number of connections.
voidsetNetworkProtocol(java.lang.String networkProtocol)
Sets the data source network protocol.
voidsetONSConfiguration(java.lang.String onsConfigStr)
Sets the configuration string used for remote ONS subscription.
voidsetPassword(java.lang.String pd)
Sets the password with which connections have to be obtained.
voidsetPortNumber(int portNumber)
Sets the database port number.
voidsetPropertyCycle(int propertyCycle)
Sets the property cycle in seconds.
voidsetRoleName(java.lang.String roleName)
Sets the data source role name.
voidsetServerName(java.lang.String serverName)
Sets the database server name.
voidsetSQLForValidateConnection(java.lang.String SQLString)
Sets the value of the SQLForValidateConnection property.
voidsetTimeoutCheckInterval(int timeInterval)
Sets the timeoutCheckInterval (in seconds).
voidsetTimeToLiveConnectionTimeout(int timeToLiveConnectionTimeout)
Sets the maximum time (in seconds) a connection may remain in-use.
voidsetURL(java.lang.String url)
Sets the URL that the data source uses to obtain connections to the
database.
voidsetUser(java.lang.String userName)
Sets the user name with which connections have to be obtained.
voidsetValidateConnectionOnBorrow(boolean validateConnectionOnBorrow)
Sets whether or not a connection being borrowed should first be
validated.
Methods inherited from interface javax.sql.DataSource
getConnection, getConnection
Methods inherited from interface javax.sql.CommonDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
Field Detail
UCP_USER
static final java.lang.String UCP_USER
UCP_URL
static final java.lang.String UCP_URL
UCP_PASSWORD
static final java.lang.String UCP_PASSWORD
UCP_SERVER_NAME
static final java.lang.String UCP_SERVER_NAME
UCP_PORT_NUMBER
static final java.lang.String UCP_PORT_NUMBER
UCP_DATABASE_NAME
static final java.lang.String UCP_DATABASE_NAME
UCP_DATA_SOURCE_NAME
static final java.lang.String UCP_DATA_SOURCE_NAME
UCP_DESCRIPTION
static final java.lang.String UCP_DESCRIPTION
UCP_NETWORK_PROTOCOL
static final java.lang.String UCP_NETWORK_PROTOCOL
UCP_ROLE_NAME
static final java.lang.String UCP_ROLE_NAME
UCP_CONNECTION_FACTORY_CLASS_NAME
static final java.lang.String UCP_CONNECTION_FACTORY_CLASS_NAME
UCP_CONNECTION_PROPERTIES
static final java.lang.String UCP_CONNECTION_PROPERTIES
UCP_CONNECTION_FACTORY_PROPERTIES
static final java.lang.String UCP_CONNECTION_FACTORY_PROPERTIES
UCP_VALIDATE_CONNECTION_ON_BORROW
static final java.lang.String UCP_VALIDATE_CONNECTION_ON_BORROW
UCP_SQL_FOR_VALIDATE_CONNECTION
static final java.lang.String UCP_SQL_FOR_VALIDATE_CONNECTION
UCP_CONNECTION_POOL_NAME
static final java.lang.String UCP_CONNECTION_POOL_NAME
UCP_INITIAL_POOL_SIZE
static final java.lang.String UCP_INITIAL_POOL_SIZE
UCP_MIN_POOL_SIZE
static final java.lang.String UCP_MIN_POOL_SIZE
UCP_MAX_POOL_SIZE
static final java.lang.String UCP_MAX_POOL_SIZE
UCP_NTH_RETURNED_CONNECTION_TO_VALIDATE
static final java.lang.String UCP_NTH_RETURNED_CONNECTION_TO_VALIDATE
UCP_ABANDONED_CONNECTION_TIMEOUT
static final java.lang.String UCP_ABANDONED_CONNECTION_TIMEOUT
UCP_TIME_TO_LIVE_CONNECTION_TIMEOUT
static final java.lang.String UCP_TIME_TO_LIVE_CONNECTION_TIMEOUT
UCP_INACTIVE_CONNECTION_TIMEOUT
static final java.lang.String UCP_INACTIVE_CONNECTION_TIMEOUT
UCP_MAX_IDLE_TIME
static final java.lang.String UCP_MAX_IDLE_TIME
UCP_TIMEOUT_CHECK_INTERVAL
static final java.lang.String UCP_TIMEOUT_CHECK_INTERVAL
UCP_PROPERTY_CYCLE
static final java.lang.String UCP_PROPERTY_CYCLE
UCP_MAX_STATEMENTS
static final java.lang.String UCP_MAX_STATEMENTS
UCP_CONNECTION_WAIT_TIMEOUT
static final java.lang.String UCP_CONNECTION_WAIT_TIMEOUT
UCP_MAX_CONNECTION_REUSE_TIME
static final java.lang.String UCP_MAX_CONNECTION_REUSE_TIME
UCP_MAX_CONNECTION_REUSE_COUNT
static final java.lang.String UCP_MAX_CONNECTION_REUSE_COUNT
UCP_CONNECTION_HARVEST_TRIGGER_COUNT
static final java.lang.String UCP_CONNECTION_HARVEST_TRIGGER_COUNT
UCP_CONNECTION_HARVEST_MAX_COUNT
static final java.lang.String UCP_CONNECTION_HARVEST_MAX_COUNT
UCP_FAST_CONNECTION_FAILOVER_ENABLED
static final java.lang.String UCP_FAST_CONNECTION_FAILOVER_ENABLED
UCP_ONS_CONFIGURATION
static final java.lang.String UCP_ONS_CONFIGURATION
Method Detail
getInitialPoolSize
int getInitialPoolSize()
setInitialPoolSize
void setInitialPoolSize(int initialPoolSize)
throws java.sql.SQLException
Integer.MAX_VALUE. It is
illegal to set this to a value greater than the maximum pool size.
Defaults to 0.
initialPoolSize - the initial pool size.
java.sql.SQLException
getMinPoolSize
int getMinPoolSize()
setMinPoolSize
void setMinPoolSize(int minPoolSize)
throws java.sql.SQLException
Integer.MAX_VALUE. It is
illegal to set this to a value greater than the maximum pool size.
Defaults to 0.
minPoolSize - The minimum number of connections.
java.sql.SQLException
getMaxPoolSize
int getMaxPoolSize()
setMaxPoolSize
void setMaxPoolSize(int maxPoolSize)
throws java.sql.SQLException
Integer.MAX_VALUE.
Defaults to Integer.MAX_VALUE.
maxPoolSize - The maximum number of connections.
java.sql.SQLException
getInactiveConnectionTimeout
int getInactiveConnectionTimeout()
setInactiveConnectionTimeout
void setInactiveConnectionTimeout(int inactivityTimeout)
throws java.sql.SQLException
Integer.MAX_VALUE.
Defaults to 0.
Setting the value to 0 disables inactive connection timeout processing.
inactivityTimeout - The inactive connection timeout in seconds.
java.sql.SQLException
getAbandonedConnectionTimeout
int getAbandonedConnectionTimeout()
setAbandonedConnectionTimeout
void setAbandonedConnectionTimeout(int abandonedConnectionTimeout)
throws java.sql.SQLException
Integer.MAX_VALUE.
Defaults to 0.
Setting the value to 0 disables abandoned connect.
abandonedConnectionTimeout - The value of how long a connection
has not been used before it is
abandoned (in seconds).
java.sql.SQLException
getConnectionWaitTimeout
int getConnectionWaitTimeout()
setConnectionWaitTimeout
void setConnectionWaitTimeout(int waitTimeout)
throws java.sql.SQLException
Integer.MAX_VALUE.
Defaults to 3.
Setting the value to 0 disables connection wait timeout processing.
waitTimeout - The amount of time to wait.
java.sql.SQLException
getTimeToLiveConnectionTimeout
int getTimeToLiveConnectionTimeout()
setTimeToLiveConnectionTimeout
void setTimeToLiveConnectionTimeout(int timeToLiveConnectionTimeout)
throws java.sql.SQLException
Integer.MAX_VALUE.
Defaults to 0.
Setting the value to 0 disables time-to-live connection timeout processing.
timeToLiveConnectionTimeout - The maximum time (in seconds) a
used connection may be active.
java.sql.SQLException
setTimeoutCheckInterval
void setTimeoutCheckInterval(int timeInterval)
throws java.sql.SQLException
Integer.MAX_VALUE.
Defaults to 30.
Setting the value to 0 disables all connection timeout processing.
timeInterval - The timeInterval (in seconds) between checks
to enforce the timeout properties.
java.sql.SQLException
getTimeoutCheckInterval
int getTimeoutCheckInterval()
timeInterval (in seconds) between
checks to enforce the timeout properties.
setFastConnectionFailoverEnabled
void setFastConnectionFailoverEnabled(boolean failoverEnabled)
throws java.sql.SQLException
failoverEnabled - true if Fast Connection Failover is
enabled; false if not.
java.sql.SQLException
getFastConnectionFailoverEnabled
boolean getFastConnectionFailoverEnabled()
true if Fast Connection Failover is enabled;
false if not.
getConnectionFactoryClassName
java.lang.String getConnectionFactoryClassName()
setConnectionFactoryClassName
void setConnectionFactoryClassName(java.lang.String factoryClassName)
throws java.sql.SQLException
PoolDataSource to operate.
factoryClassName - Connection factory class name for obtaining
physical connections.
java.sql.SQLException
setMaxStatements
void setMaxStatements(int maxStatements)
throws java.sql.SQLException
Integer.MAX_VALUE.
Defaults to 0.
maxStatements - maximum number of statements to be pooled.
java.sql.SQLException - Exception occurred during the process of setting
maximum statements that may be pooled on a connection.
getMaxStatements
int getMaxStatements()
setMaxIdleTime
void setMaxIdleTime(int idleTime)
throws java.sql.SQLException
Integer.MAX_VALUE.
Defaults to 0.
idleTime - Maximum idle time in seconds.
java.sql.SQLException
getMaxIdleTime
int getMaxIdleTime()
setPropertyCycle
void setPropertyCycle(int propertyCycle)
throws java.sql.SQLException
timeoutCheckInterval.
The range of valid values is 0 to Integer.MAX_VALUE.
Defaults to 30.
propertyCycle - Time interval in seconds to enforce
connection pool timeout properties.
java.sql.SQLException
getPropertyCycle
int getPropertyCycle()
setConnectionPoolName
void setConnectionPoolName(java.lang.String connectionpoolName)
throws java.sql.SQLException
connectionpoolName - Name of the connection pool.
java.sql.SQLException
getConnectionPoolName
java.lang.String getConnectionPoolName()
setURL
void setURL(java.lang.String url)
throws java.sql.SQLException
url - URL to be set.
java.sql.SQLException
getURL
java.lang.String getURL()
setUser
void setUser(java.lang.String userName)
throws java.sql.SQLException
userName - Username to be set.
java.sql.SQLException
getUser
java.lang.String getUser()
setPassword
void setPassword(java.lang.String pd)
throws java.sql.SQLException
pd - Passowrd to be set.
java.sql.SQLException
getPassword
java.lang.String getPassword()
setServerName
void setServerName(java.lang.String serverName)
throws java.sql.SQLException
serverName - Database server name to be set.
java.sql.SQLException
getServerName
java.lang.String getServerName()
setPortNumber
void setPortNumber(int portNumber)
throws java.sql.SQLException
portNumber - Database port number to be set.
java.sql.SQLException
getPortNumber
int getPortNumber()
setDatabaseName
void setDatabaseName(java.lang.String databaseName)
throws java.sql.SQLException
databaseName - Database name to be set.
java.sql.SQLException
getDatabaseName
java.lang.String getDatabaseName()
setDataSourceName
void setDataSourceName(java.lang.String dataSourceName)
throws java.sql.SQLException
dataSourceName - datas ource name to be set.
java.sql.SQLException
getDataSourceName
java.lang.String getDataSourceName()
setDescription
void setDescription(java.lang.String description)
throws java.sql.SQLException
description - data source description to be set.
java.sql.SQLException
getDescription
java.lang.String getDescription()
setNetworkProtocol
void setNetworkProtocol(java.lang.String networkProtocol)
throws java.sql.SQLException
networkProtocol - data source network protocol to be set.
java.sql.SQLException
getNetworkProtocol
java.lang.String getNetworkProtocol()
setRoleName
void setRoleName(java.lang.String roleName)
throws java.sql.SQLException
roleName - data source role name to be set.
java.sql.SQLException
getRoleName
java.lang.String getRoleName()
setValidateConnectionOnBorrow
void setValidateConnectionOnBorrow(boolean validateConnectionOnBorrow)
throws java.sql.SQLException
false.
validateConnectionOnBorrow - Whether or not a connection
being borrowed should first be
validated.
java.sql.SQLException
getValidateConnectionOnBorrow
boolean getValidateConnectionOnBorrow()
setSQLForValidateConnection
void setSQLForValidateConnection(java.lang.String SQLString)
throws java.sql.SQLException
SQLForValidateConnection property.
This is a SQL command used in conjunction with the
ValidateConnectionOnBorrow property.
The SQL specified should be applicable to the backend database and the
JDBC driver configured. Defaults to null.
SQLString - The SQL string used for connection validation.
java.sql.SQLException
getSQLForValidateConnection
java.lang.String getSQLForValidateConnection()
SQLForValidateConnection property.
getConnectionHarvestTriggerCount
int getConnectionHarvestTriggerCount()
setConnectionHarvestTriggerCount
void setConnectionHarvestTriggerCount(int connectionHarvestTriggerCount)
throws java.sql.SQLException
maxPoolSize. Defaults to
Integer.MAX_VALUE.
Setting the value to Integer.MAX_VALUE disables connection
harvesting.
connectionHarvestTriggerCount - The number of available
connections below which the
connection pool's connection
harvesting will occur.
java.sql.SQLException
getConnectionHarvestMaxCount
int getConnectionHarvestMaxCount()
connectionHarvestMaxCount.
setConnectionHarvestMaxCount
void setConnectionHarvestMaxCount(int connectionHarvestMaxCount)
throws java.sql.SQLException
maxPoolSize. Defaults to 1.
connectionHarvestMaxCount - the maximum number of connections
that may be harvested when the
connection harvesting occurs.
java.sql.SQLException
getAvailableConnectionsCount
int getAvailableConnectionsCount()
throws java.sql.SQLException
AvailableConnectionsCount
java.sql.SQLException
getBorrowedConnectionsCount
int getBorrowedConnectionsCount()
throws java.sql.SQLException
BorrowedConnectionsCount
java.sql.SQLException
getONSConfiguration
java.lang.String getONSConfiguration()
throws java.sql.SQLException
setONSConfiguration(String). This is used by Fast
Connection Failover and Runtime Connection Load Balancing.
java.sql.SQLException
setONSConfiguration
void setONSConfiguration(java.lang.String onsConfigStr)
throws java.sql.SQLException
ons.config). The string contains a list
of name=value pairs separated by a newline
character (\n). The name can be one of nodes,
walletfile, or walletpassword.
nodes attribute as a list of host:port pairs
separated by a comma. SSL would be used when the walletfile
attribute is specified as an Oracle wallet file.
An example ONS configuration string:
"nodes=host1:4200,host2:4200\nwalletfile=wfile\nwalletpassword=wpwd"
This is used primarily by Fast Connection Failover and Runtime
Load Balancing.
onsConfigStr - The configuration string for remote ONS
subscription.
java.sql.SQLException
java.sql.Connection getConnection(java.util.Properties labels)
throws java.sql.SQLException
labels - The requested connection labels.
java.sql.SQLException - if a database-access error occurs.
java.sql.Connection getConnection(java.lang.String username,
java.lang.String password,
java.util.Properties labels)
throws java.sql.SQLException
username - The database user on whose behalf the connection
is being made.password - The user's password.labels - The requested connection labels.
java.sql.SQLException - if a database-access error occurs.
void registerConnectionLabelingCallback(ConnectionLabelingCallback cbk)
throws java.sql.SQLException
cbk - The ConnectionLabelingCallback object to be
registered.
java.sql.SQLException - If there is a callback already
registered with the pool.
void removeConnectionLabelingCallback()
throws java.sql.SQLException
ConnectionLabelingCallback object registered with the
underlying connection pool, if any.
java.sql.SQLException - If callback removal fails.
void registerConnectionAffinityCallback(ConnectionAffinityCallback cbk)
throws java.sql.SQLException
cbk - Affinity Callback object that must be registered.
java.sql.SQLException - If callback registration fails.
void removeConnectionAffinityCallback()
throws java.sql.SQLException
ConnectionAffinityCallback object registered on
the connection pool.
- Throws:
java.sql.SQLException - If callback removal fails.
java.util.Properties getConnectionProperties()
java.lang.String getConnectionProperty(java.lang.String propertyName)
propertyName - The name of the specified property.
void setConnectionProperty(java.lang.String name,
java.lang.String value)
throws java.sql.SQLException
oracle.jdbc.pool.OracleDataSource in the Oracle
JDBC driver.
name - The name of the connection property to be set on
the connection factory class.value - The value of the connection property to be set on
the connection factory class.
java.sql.SQLException - If any exception occurred while setting the connection
property.setConnectionFactoryProperties
void setConnectionProperties(java.util.Properties connectionProperties)
throws java.sql.SQLException
oracle.jdbc.pool.OracleDataSource in the Oracle
JDBC driver.
connectionProperties - Connection properties to be set on the connection factory class.
java.sql.SQLException - If any exception occurred while setting the connection
properties.setConnectionFactoryPropertiesjava.util.Properties getConnectionFactoryProperties()
java.lang.String getConnectionFactoryProperty(java.lang.String propertyName)
propertyName - The name of the specified property.
void setConnectionFactoryProperty(java.lang.String name,
java.lang.String value)
throws java.sql.SQLException
java.sql.Driver,
the connection factory property specified here will be assumed
as a connection property.
For DataSource connection factories, the property specified here
will be assumed as a DataSource property.
name - The name of the connection factory property to be set
on the connection factory class.value - The value of the connection factory property to be set
on the connection factory class.
java.sql.SQLException - If any exception occurred while setting the connection factory
property.
java.lang.IllegalArgumentException - If the property name or value is invalid.
void setConnectionFactoryProperties(java.util.Properties factoryProperties)
throws java.sql.SQLException
java.sql.Driver,
the connection factory properties specified here will be assumed
as the connection properties.
For DataSource connection factories, the properties specified here
will be assumed as the DataSource properties.
factoryProperties - Connection factory properties to be set on the connection
factory class.
java.sql.SQLException - If any exception occurred while setting the connection factory
properties.
java.lang.IllegalArgumentException - If factoryProperties is empty.long getMaxConnectionReuseTime()
setMaxConnectionReuseTime().
void setMaxConnectionReuseTime(long maxConnectionReuseTime)
throws java.sql.SQLException
maxConnectionReuseTime - Maximum connection reuse time (in seconds).
java.sql.SQLExceptionint getMaxConnectionReuseCount()
setMaxConnectionReuseCount().
void setMaxConnectionReuseCount(int maxConnectionReuseCount)
throws java.sql.SQLException
maxConnectionReuseCount - Maximum connection reuse count.
java.sql.SQLExceptionJDBCConnectionPoolStatistics getStatistics()
|
Oracle® Universal Connection Pool for JDBC Java API Reference 11g Release 2 (11.2.0.4) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||