|
Oracle® Universal Connection Pool for JDBC Java API Reference 11g Release 2 (11.2) E12826-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ucp.jdbc.PoolDataSourceImpl
public class PoolDataSourceImpl
A connection pool-aware data source. This DataSource uses the Universal Connection Pool to get a connection, creating a proxy to that connection, and returning the proxy to the client. When the client calls close on the connection proxy, the underlying physical connection is returned to the pool. <p/> Besides other data source properties, applications must set the connection factory class name. The connection factory class is a class that implements javax.sql.DataSource and does not implement its own connection pooling. The connection factory's getConnection(...) methods should return a physical JDBC connection to the database. For example, "oracle.jdbc.pool.OracleDataSource" is a valid connection factory class name.
Field Summary | |
---|---|
protected java.lang.Object |
m_connectionFactory |
protected java.lang.String |
m_connectionFactoryClassName |
protected oracle.ucp.jdbc.JDBCConnectionPool |
m_cp |
Constructor Summary | |
---|---|
PoolDataSourceImpl() |
Method Summary | ||
---|---|---|
protected void |
createPoolWithDefaultProperties() |
|
UniversalConnectionPool |
createUniversalConnectionPool() Creates a Universal Connection Pool instance using this adapter. |
|
UniversalConnectionPoolMBean |
createUniversalConnectionPoolMBean() Creates a Universal Connection Pool MBean using this adapter. |
|
int |
getAbandonedConnectionTimeout() Gets the abandoned connection timeout value. |
|
int |
getAvailableConnectionsCount() Gets the number of available connections in the pool. |
|
int |
getBorrowedConnectionsCount() Gets the number of borrowed connections from the pool. |
|
java.sql.Connection |
getConnection() |
|
java.sql.Connection |
getConnection(java.util.Properties labels) Attempts to obtain a database connection with the requested connection labels. |
|
java.sql.Connection |
getConnection(java.lang.String username, java.lang.String password) |
|
java.sql.Connection |
getConnection(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.String |
getConnectionFactoryClassName() Gets the Connection Factory class name. |
|
java.util.Properties |
getConnectionFactoryProperties() Gets the connection factory properties that are set on this data source. |
|
java.lang.String |
getConnectionFactoryProperty(java.lang.String propertyName) Gets the specified connection factory property that are set on this data source. |
|
int |
getConnectionHarvestMaxCount() Gets the maximum number of connections that may be harvested when the connection harvesting occurs. |
|
int |
getConnectionHarvestTriggerCount() Gets the number of available connections at which the connection pool's connection harvesting will occur. |
|
java.lang.String |
getConnectionPoolName() Gets the connection pool name. |
|
java.util.Properties |
getConnectionProperties() Gets the connection properties that are set on this data source. |
|
java.lang.String |
getConnectionProperty(java.lang.String propertyName) Gets the specified connection property that are set on this data source. |
|
int |
getConnectionWaitTimeout() Gets the amount of time to wait (in seconds) for a used connection to be released by a client. |
|
java.lang.String |
getDatabaseName() Gets the database name. |
|
java.lang.String |
getDataSourceName() Gets the data source name. |
|
java.lang.String |
getDescription() Gets the data source description. |
|
boolean |
getFastConnectionFailoverEnabled() Checks if Fast Connection Failover is enabled. |
|
int |
getInactiveConnectionTimeout() Gets the inactive connection timeout. |
|
int |
getInitialPoolSize() Gets the initial pool size. |
|
int |
getLoginTimeout() |
|
java.io.PrintWriter |
getLogWriter() |
|
int |
getMaxConnectionReuseCount() Gets the connection reuse count property. |
|
long |
getMaxConnectionReuseTime() Gets the connection reuse time property. |
|
int |
getMaxIdleTime() Gets Idle timeout value. |
|
int |
getMaxPoolSize() Gets the maximum number of connections that the connection pool will maintain. |
|
int |
getMaxStatements() Gets the maximum number of statements that may be pooled or cached on a Connection. |
|
int |
getMinPoolSize() Gets the minimum number of connections that the connection pool will maintain. |
|
java.lang.String |
getNetworkProtocol() Gets the datasource networkProtocol. |
|
java.lang.Object |
getObjectInstance(java.lang.Object refObj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env) |
|
java.lang.String |
getONSConfiguration() Returns the ONS configuration string that is used for remote ONS subscription, in the form specified in setONSConfiguration(String). |
|
java.lang.String |
getPassword() Gets the Password for this data source. |
|
int |
getPortNumber() Gets the database port number. |
|
int |
getPropertyCycle() Gets Property cycle in seconds. |
|
javax.naming.Reference |
getReference() |
|
java.lang.String |
getRoleName() Gets the datasource role name. |
|
java.lang.String |
getServerName() Gets the database server name. |
|
java.lang.String |
getSQLForValidateConnection() Gets the Value for SQLForValidateConnection property. |
|
JDBCConnectionPoolStatistics |
getStatistics() Gets the statistics of the connection pool. |
|
int |
getTimeoutCheckInterval() Gets the timeout check interval (in seconds). |
|
int |
getTimeToLiveConnectionTimeout() Gets the maximum time (in seconds) a connection may remain in-use. |
|
java.lang.String |
getURL() Gets the URL for this data source. |
|
java.lang.String |
getUser() Gets the user name for this data source. |
|
boolean |
getValidateConnectionOnBorrow() Returns whether or not a connection being borrowed should first be validated. |
|
boolean |
isWrapperFor(java.lang.Class<?> iface) Since this class is not a wrapper, just check to see if this implements the requested interface. |
|
void |
registerConnectionAffinityCallback(ConnectionAffinityCallback cbk) Registers a ConnectionAffinityCallback on the connection pool. |
|
void |
registerConnectionLabelingCallback(ConnectionLabelingCallback cbk) Registers a ConnectionLabelingCallback with the underlying connection pool. |
|
void |
removeConnectionAffinityCallback() Removes the ConnectionAffinityCallback registered on the connection pool. |
|
void |
removeConnectionLabelingCallback() Removes the ConnectionLabelingCallback object registered with the underlying connection pool, if any. |
|
void |
setAbandonedConnectionTimeout(int abandonedConnectionTimeout) Sets the abandoned connection timeout. |
|
void |
setConnectionFactoryClassName(java.lang.String factoryClassName) Sets the Connection Factory class name. |
|
void |
setConnectionFactoryProperties(java.util.Properties factoryProperties) Sets the connection factory properties on the connection factory. |
|
void |
setConnectionFactoryProperty(java.lang.String name, java.lang.String value) Sets a connection factory property on the connection factory. |
|
void |
setConnectionHarvestMaxCount(int connectionHarvestMaxCount) Sets the maximum number of connections that may be harvested when the connection harvesting occurs. |
|
void |
setConnectionHarvestTriggerCount(int connectionHarvestTriggerCount) Sets the number of available connections at which the connection pool's connection harvesting will occur. |
|
void |
setConnectionPoolName(java.lang.String connectionPoolName) Sets the connection pool name. |
|
void |
setConnectionProperties(java.util.Properties connectionProperties) Sets the connection properties on the connection factory. |
|
void |
setConnectionProperty(java.lang.String name, java.lang.String value) Sets a connection property on the connection factory. |
|
void |
setConnectionWaitTimeout(int waitTimeout) Sets the amount of time to wait (in seconds) for a used connection to be released by a client. |
|
void |
setDatabaseName(java.lang.String databaseName) Sets the database name. |
|
void |
setDataSourceName(java.lang.String dataSourceName) Sets the data source name. |
|
void |
setDescription(java.lang.String description) Sets the data source description. |
|
void |
setFastConnectionFailoverEnabled(boolean failoverEnabled) Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source. |
|
void |
setInactiveConnectionTimeout(int inactivityTimeout) Sets the inactive connection timeout. |
|
void |
setInitialPoolSize(int initialPoolSize) Sets the initial pool size. |
|
void |
setLoginTimeout(int seconds) |
|
void |
setLogWriter(java.io.PrintWriter out) |
|
void |
setMaxConnectionReuseCount(int maxConnectionReuseCount) Gets the connection reuse count property. |
|
void |
setMaxConnectionReuseTime(long maxConnectionReuseTime) Gets the connection reuse time property. |
|
void |
setMaxIdleTime(int idleTime) Sets Idle timeout for available connections in the pool. |
|
void |
setMaxPoolSize(int maxPoolSize) Sets the maximum number of connections. |
|
void |
setMaxStatements(int maxStatements) Sets the maximum number of statements that may be pooled or cached on a connection. |
|
void |
setMinPoolSize(int minPoolSize) Sets the minimum number of connections. |
|
void |
setNetworkProtocol(java.lang.String networkProtocol) Sets the datasource networkProtocol. |
|
void |
setONSConfiguration(java.lang.String onsConfigStr) Sets the configuration string used for remote ONS subscription. |
|
void |
setPassword(java.lang.String password) Sets the password with which connections have to be obtained. |
|
void |
setPortNumber(int portNumber) Sets the database port number. |
|
void |
setPropertyCycle(int propertyCycle) Sets Property cycle in seconds. |
|
void |
setRoleName(java.lang.String roleName) Sets the datasource role name. |
|
void |
setServerName(java.lang.String serverName) Sets the database server name. |
|
void |
setSQLForValidateConnection(java.lang.String SQLString) Sets the value(SQL) for SQLForValidateConnection property. |
|
void |
setTimeoutCheckInterval(int timeInterval) Sets the timeoutCheckInterval (in seconds). |
|
void |
setTimeToLiveConnectionTimeout(int timeToLiveConnectionTimeout) Sets the maximum time (in seconds) a connection may remain in-use. |
|
void |
setURL(java.lang.String url) Sets the URL that the data source uses to obtain connections to the database. |
|
void |
setUser(java.lang.String user) Sets the user name with which connections have to be obtained. |
|
void |
setValidateConnectionOnBorrow(boolean validateConnectionOnBorrow) Sets whether or not a connection being borrowed should first be validated. |
|
void |
startPool() |
|
static java.lang.Object |
toBasicType(java.lang.String value, java.lang.String type) |
|
|
unwrap(java.lang.Class<T> iface) Since this class is not a wrapper, just check to see if this implements the requested interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String m_connectionFactoryClassName
protected java.lang.Object m_connectionFactory
protected oracle.ucp.jdbc.JDBCConnectionPool m_cp
Constructor Detail |
---|
public PoolDataSourceImpl()
Method Detail |
---|
public void startPool() throws java.sql.SQLException
java.sql.SQLException
protected void createPoolWithDefaultProperties() throws java.sql.SQLException
java.sql.SQLException
public UniversalConnectionPool createUniversalConnectionPool() throws java.sql.SQLException
createUniversalConnectionPool
in interface UniversalConnectionPoolAdapter
java.sql.SQLException
- If any error occurs during the process of connection pool creation.UniversalConnectionPoolManager
public UniversalConnectionPoolMBean createUniversalConnectionPoolMBean() throws java.sql.SQLException
createUniversalConnectionPoolMBean
in interface UniversalConnectionPoolAdapter
java.sql.SQLException
- If any error occurs during the process of connection pool creation.UniversalConnectionPoolManagerMBean
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.util.Properties labels) throws java.sql.SQLException
getConnection
in interface PoolDataSource
labels
- The requested connection labels.java.sql.SQLException
- if a database-access error occurs.public java.sql.Connection getConnection(java.lang.String username, java.lang.String password, java.util.Properties labels) throws java.sql.SQLException
getConnection
in interface PoolDataSource
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.public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
getLogWriter
in interface javax.sql.DataSource
java.sql.SQLException
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
setLogWriter
in interface javax.sql.DataSource
java.sql.SQLException
public void setLoginTimeout(int seconds) throws java.sql.SQLException
setLoginTimeout
in interface javax.sql.DataSource
java.sql.SQLException
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.DataSource
java.sql.SQLException
public java.lang.String getUser()
PoolDataSource
getUser
in interface PoolDataSource
public void setUser(java.lang.String user) throws java.sql.SQLException
PoolDataSource
setUser
in interface PoolDataSource
user
- Username to be set.java.sql.SQLException
public java.lang.String getPassword()
PoolDataSource
getPassword
in interface PoolDataSource
public void setPassword(java.lang.String password) throws java.sql.SQLException
PoolDataSource
setPassword
in interface PoolDataSource
password
- Passowrd to be set.java.sql.SQLException
public java.lang.String getURL()
PoolDataSource
getURL
in interface PoolDataSource
public void setURL(java.lang.String url) throws java.sql.SQLException
PoolDataSource
setURL
in interface PoolDataSource
url
- URL to be set.java.sql.SQLException
public void setServerName(java.lang.String serverName) throws java.sql.SQLException
setServerName
in interface PoolDataSource
serverName
- Database server name to be set.java.sql.SQLException
public java.lang.String getServerName()
getServerName
in interface PoolDataSource
public void setPortNumber(int portNumber) throws java.sql.SQLException
setPortNumber
in interface PoolDataSource
portNumber
- Database port number to be set.java.sql.SQLException
public int getPortNumber()
getPortNumber
in interface PoolDataSource
public void setDatabaseName(java.lang.String databaseName) throws java.sql.SQLException
setDatabaseName
in interface PoolDataSource
databaseName
- Database name to be set.java.sql.SQLException
public java.lang.String getDatabaseName()
getDatabaseName
in interface PoolDataSource
public void setDataSourceName(java.lang.String dataSourceName) throws java.sql.SQLException
setDataSourceName
in interface PoolDataSource
dataSourceName
- data source name to be set.java.sql.SQLException
public java.lang.String getDataSourceName()
getDataSourceName
in interface PoolDataSource
public void setDescription(java.lang.String description) throws java.sql.SQLException
setDescription
in interface PoolDataSource
description
- data source description to be set.java.sql.SQLException
public java.lang.String getDescription()
getDescription
in interface PoolDataSource
public void setNetworkProtocol(java.lang.String networkProtocol) throws java.sql.SQLException
setNetworkProtocol
in interface PoolDataSource
networkProtocol
- datasource networkProtocol to be set.java.sql.SQLException
public java.lang.String getNetworkProtocol()
getNetworkProtocol
in interface PoolDataSource
public void setRoleName(java.lang.String roleName) throws java.sql.SQLException
setRoleName
in interface PoolDataSource
roleName
- datasource role name to be set.java.sql.SQLException
public java.lang.String getRoleName()
getRoleName
in interface PoolDataSource
public void setInitialPoolSize(int initialPoolSize) throws java.sql.SQLException
PoolDataSource
Integer.MAX_VALUE
. It is illegal to set this to a value greater than the maximum pool size. Defaults to 0.setInitialPoolSize
in interface PoolDataSource
initialPoolSize
- the initial pool size.java.sql.SQLException
public int getInitialPoolSize()
PoolDataSource
getInitialPoolSize
in interface PoolDataSource
public void setMinPoolSize(int minPoolSize) throws java.sql.SQLException
PoolDataSource
Integer.MAX_VALUE
. It is illegal to set this to a value greater than the maximum pool size. Defaults to 0.setMinPoolSize
in interface PoolDataSource
minPoolSize
- The minimum number of connections.java.sql.SQLException
public int getMinPoolSize()
PoolDataSource
getMinPoolSize
in interface PoolDataSource
public void setMaxPoolSize(int maxPoolSize) throws java.sql.SQLException
PoolDataSource
Integer.MAX_VALUE
. Defaults to Integer.MAX_VALUE
.setMaxPoolSize
in interface PoolDataSource
maxPoolSize
- The maximum number of connections.java.sql.SQLException
public int getMaxPoolSize()
PoolDataSource
getMaxPoolSize
in interface PoolDataSource
public void setInactiveConnectionTimeout(int inactivityTimeout) throws java.sql.SQLException
PoolDataSource
Integer.MAX_VALUE
. Defaults to 0. <p/> Setting the value to 0 disables inactive connection timeout processing.setInactiveConnectionTimeout
in interface PoolDataSource
inactivityTimeout
- The inactive connection timeout in seconds.java.sql.SQLException
public int getInactiveConnectionTimeout()
PoolDataSource
getInactiveConnectionTimeout
in interface PoolDataSource
public void setConnectionWaitTimeout(int waitTimeout) throws java.sql.SQLException
PoolDataSource
Integer.MAX_VALUE
. Defaults to 3. <p/> Setting the value to 0 disables connection wait timeout processing.setConnectionWaitTimeout
in interface PoolDataSource
waitTimeout
- The amount of time to wait.java.sql.SQLException
public int getConnectionWaitTimeout()
PoolDataSource
getConnectionWaitTimeout
in interface PoolDataSource
public void setTimeToLiveConnectionTimeout(int timeToLiveConnectionTimeout) throws java.sql.SQLException
PoolDataSource
Integer.MAX_VALUE
. Defaults to 0. <p/> Setting the value to 0 disables time-to-live connection timeout processing.setTimeToLiveConnectionTimeout
in interface PoolDataSource
timeToLiveConnectionTimeout
- The maximum time (in seconds) a used connection may be active.java.sql.SQLException
public int getTimeToLiveConnectionTimeout()
PoolDataSource
getTimeToLiveConnectionTimeout
in interface PoolDataSource
public int getAbandonedConnectionTimeout()
PoolDataSource
getAbandonedConnectionTimeout
in interface PoolDataSource
public void setAbandonedConnectionTimeout(int abandonedConnectionTimeout) throws java.sql.SQLException
PoolDataSource
Integer.MAX_VALUE
. Defaults to 0. <p/> Setting the value to 0 disables abandoned connect.
Specified by:
setAbandonedConnectionTimeout
in interface PoolDataSource
abandonedConnectionTimeout
- The value of how long a connection has not been used before it is abandoned (in seconds).java.sql.SQLException
public void setTimeoutCheckInterval(int timeInterval) throws java.sql.SQLException
PoolDataSource
Integer.MAX_VALUE
. Defaults to 30. <p/> Setting the value to 0 disables all connection timeout processing.setTimeoutCheckInterval
in interface PoolDataSource
timeInterval
- The timeInterval (in seconds) between checks to enforce the timeout properties.java.sql.SQLException
public int getTimeoutCheckInterval()
PoolDataSource
getTimeoutCheckInterval
in interface PoolDataSource
timeInterval
(in seconds) between checks to enforce the timeout properties.public void setFastConnectionFailoverEnabled(boolean failoverEnabled) throws java.sql.SQLException
PoolDataSource
setFastConnectionFailoverEnabled
in interface PoolDataSource
failoverEnabled
- true
if Fast Connection Failover is enabled; false
if not.java.sql.SQLException
public boolean getFastConnectionFailoverEnabled()
PoolDataSource
getFastConnectionFailoverEnabled
in interface PoolDataSource
true
if Fast Connection Failover is enabled; false
if not.public java.lang.String getConnectionFactoryClassName()
PoolDataSource
getConnectionFactoryClassName
in interface PoolDataSource
public void setConnectionFactoryClassName(java.lang.String factoryClassName) throws java.sql.SQLException
PoolDataSource
PoolDataSource
to operate.setConnectionFactoryClassName
in interface PoolDataSource
factoryClassName
- Connection factory class name for obtaining physical connections.java.sql.SQLException
public void setMaxStatements(int maxStatements) throws java.sql.SQLException
setMaxStatements
in interface PoolDataSource
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.public int getMaxStatements()
getMaxStatements
in interface PoolDataSource
public void setMaxIdleTime(int idleTime) throws java.sql.SQLException
setMaxIdleTime
in interface PoolDataSource
idleTime
- Idle timeout value in seconds.java.sql.SQLException
public int getMaxIdleTime()
getMaxIdleTime
in interface PoolDataSource
public void setPropertyCycle(int propertyCycle) throws java.sql.SQLException
setPropertyCycle
in interface PoolDataSource
propertyCycle
- Time interval in seconds to enforce connection pool timeout properties.java.sql.SQLException
public int getPropertyCycle()
getPropertyCycle
in interface PoolDataSource
public void setConnectionPoolName(java.lang.String connectionPoolName) throws java.sql.SQLException
setConnectionPoolName
in interface PoolDataSource
connectionPoolName
- Name of connection pool.java.sql.SQLException
public java.lang.String getConnectionPoolName()
getConnectionPoolName
in interface PoolDataSource
public void setValidateConnectionOnBorrow(boolean validateConnectionOnBorrow) throws java.sql.SQLException
setValidateConnectionOnBorrow
in interface PoolDataSource
validateConnectionOnBorrow
- Whether or not a connection being borrowed should first be validated.java.sql.SQLException
public boolean getValidateConnectionOnBorrow()
getValidateConnectionOnBorrow
in interface PoolDataSource
public void setSQLForValidateConnection(java.lang.String SQLString) throws java.sql.SQLException
setSQLForValidateConnection
in interface PoolDataSource
SQLString
- The SQL string used for connection validation.java.sql.SQLException
public java.lang.String getSQLForValidateConnection()
getSQLForValidateConnection
in interface PoolDataSource
public int getConnectionHarvestTriggerCount()
getConnectionHarvestTriggerCount
in interface PoolDataSource
public void setConnectionHarvestTriggerCount(int connectionHarvestTriggerCount) throws java.sql.SQLException
setConnectionHarvestTriggerCount
in interface PoolDataSource
connectionHarvestTriggerCount
- The number of available connections at which the connection pool's connection harvesting will occur.java.sql.SQLException
public int getConnectionHarvestMaxCount()
getConnectionHarvestMaxCount
in interface PoolDataSource
public void setConnectionHarvestMaxCount(int connectionHarvestMaxCount) throws java.sql.SQLException
setConnectionHarvestMaxCount
in interface PoolDataSource
connectionHarvestMaxCount
- the maximum number of connections that may be harvested when the connection harvesting occurs.java.sql.SQLException
public long getMaxConnectionReuseTime()
getMaxConnectionReuseTime
in interface PoolDataSource
public void setMaxConnectionReuseTime(long maxConnectionReuseTime) throws java.sql.SQLException
setMaxConnectionReuseTime
in interface PoolDataSource
connection
- reuse time (in seconds), 0 value means that the feature is disabled.java.sql.SQLException
public int getMaxConnectionReuseCount()
getMaxConnectionReuseCount
in interface PoolDataSource
public void setMaxConnectionReuseCount(int maxConnectionReuseCount) throws java.sql.SQLException
setMaxConnectionReuseCount
in interface PoolDataSource
connection
- reuse count, 0 value means that the feature is disabled.java.sql.SQLException
public int getAvailableConnectionsCount()
getAvailableConnectionsCount
in interface PoolDataSource
public int getBorrowedConnectionsCount()
getBorrowedConnectionsCount
in interface PoolDataSource
public java.lang.String getONSConfiguration() throws java.sql.SQLException
getONSConfiguration
in interface PoolDataSource
java.sql.SQLException
public void setONSConfiguration(java.lang.String onsConfigStr) throws java.sql.SQLException
"nodes=host1:4200,host2:4200\nwalletfile=wfile\nwalletpassword=wpwd"
<p/> This is used primarily by Fast Connection Failover and Runtime Load Balancing.setONSConfiguration
in interface PoolDataSource
onsConfigStr
- The configuration string for remote ONS subscription.java.sql.SQLException
public void registerConnectionLabelingCallback(ConnectionLabelingCallback cbk) throws java.sql.SQLException
registerConnectionLabelingCallback
in interface PoolDataSource
cbk
- The ConnectionLabelingCallback object to be registered.java.sql.SQLException
- If there is a callback already registered with the pool.public void removeConnectionLabelingCallback() throws java.sql.SQLException
removeConnectionLabelingCallback
in interface PoolDataSource
java.sql.SQLException
- If callback removal fails.public void registerConnectionAffinityCallback(ConnectionAffinityCallback cbk) throws java.sql.SQLException
registerConnectionAffinityCallback
in interface PoolDataSource
cbk
- Affinity Callback object that must be registered.java.sql.SQLException
- If callback registration fails.public void removeConnectionAffinityCallback() throws java.sql.SQLException
removeConnectionAffinityCallback
in interface PoolDataSource
java.sql.SQLException
- If callback removal fails.public JDBCConnectionPoolStatistics getStatistics()
getStatistics
in interface PoolDataSource
public java.util.Properties getConnectionProperties()
getConnectionProperties
in interface PoolDataSource
public java.lang.String getConnectionProperty(java.lang.String propertyName)
getConnectionProperty
in interface PoolDataSource
propertyName
- The name of the specified property.public void setConnectionProperty(java.lang.String name, java.lang.String value) throws java.sql.SQLException
oracle.jdbc.pool.OracleDataSource
in the Oracle JDBC driver.setConnectionProperty
in interface PoolDataSource
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
public void setConnectionProperties(java.util.Properties connectionProperties) throws java.sql.SQLException
oracle.jdbc.pool.OracleDataSource
in the Oracle JDBC driver.setConnectionProperties
in interface PoolDataSource
connectionProperties
- Connection properties to be set on the connection factory class.java.sql.SQLException
- If any exception occurred while setting the connection properties.setConnectionFactoryProperties
public java.util.Properties getConnectionFactoryProperties()
getConnectionFactoryProperties
in interface PoolDataSource
public java.lang.String getConnectionFactoryProperty(java.lang.String propertyName)
getConnectionFactoryProperty
in interface PoolDataSource
propertyName
- The name of the specified property.public 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. <p/> For DataSource connection factories, the property specified here will be assumed as a DataSource property.setConnectionFactoryProperty
in interface PoolDataSource
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.public 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. <p/> For DataSource connection factories, the properties specified here will be assumed as the DataSource properties.setConnectionFactoryProperties
in interface PoolDataSource
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.public static final java.lang.Object toBasicType(java.lang.String value, java.lang.String type)
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException
public java.lang.Object getObjectInstance(java.lang.Object refObj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env) throws java.lang.Exception
getObjectInstance
in interface javax.naming.spi.ObjectFactory
java.lang.Exception
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
iface
- Requested interface.java.sql.SQLException
- If the argument is not an interface.public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
iface
- Requested interface.java.sql.SQLException
- If this does not implement the arg or the arg is not an interface.
|
Oracle® Universal Connection Pool for JDBC Java API Reference 11g Release 2 (11.2) E12826-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |