public class JDBCConnectionPool
extends oracle.ucp.common.UniversalConnectionPoolImpl
| Modifier and Type | Field and Description |
|---|---|
protected ConnectionInitializationCallback |
m_connectionInitializationCallback |
availCondition, availLock, borrowedAccumulator, borrowedConnectionsCount, borrowedSamples, core, DEFAULT_ABANDONED_CONNECTION_TIMEOUT, DEFAULT_CONNECTION_HARVEST_MAX_COUNT, DEFAULT_CONNECTION_HARVEST_TRIGGER_COUNT, DEFAULT_CONNECTION_WAIT_TIMEOUT, DEFAULT_INACTIVE_CONNECTION_TIMEOUT, DEFAULT_INITIAL_POOL_SIZE, DEFAULT_MAX_CONNECTIONS_PER_SERVICE, DEFAULT_MAX_CONNECTIONS_PER_SHARD, DEFAULT_MAX_POOL_SIZE, DEFAULT_MIN_POOL_SIZE, DEFAULT_POOLNAME_PREFIX, DEFAULT_QUERY_TIMEOUT, DEFAULT_SECONDS_TO_TRUST_IDLE_CONNECTION, DEFAULT_TIME_TO_LIVE_CONNECTION_TIMEOUT, DEFAULT_TIMEOUT_CHECK_INTERVAL, DEFAULT_VALIDATE_BORROWED_CONNECTION, logWriter, m_connectionAffinityCallback, m_connectionLabelingCallback, m_lifeCycleState, THREAD_POOL_SIZE, totalConnectionsCount| Constructor and Description |
|---|
JDBCConnectionPool(JDBCConnectionFactoryAdapter connectionFactoryAdapter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
UniversalPooledConnection |
borrowConnection(ConnectionRetrievalInfo connectionRetrievalInfo)
Gets a Universal Pooled Connection from the base pool and enables the
statement caching when qualified.
|
ConnectionInitializationCallback |
getConnectionInitializationCallback()
Obtains
ConnectionInitializationCallback registered on the
connection pool. |
protected Object |
getConnectionObjectForLabelingConfigure(UniversalPooledConnection upc)
Public and protected methods used in other packages.
|
int |
getMaxStatements()
Gets the maximum number of statements being pooled.
|
String |
getSQLForValidateConnection()
Gets the value of the
SQLForValidateConnection property. |
void |
registerConnectionInitializationCallback(ConnectionInitializationCallback cbk)
Registers
ConnectionInitializationCallback with this connection
pool. |
void |
setMaxStatements(int maxStatements)
Sets the maximum number of statements to be pooled per connection.
|
void |
setSQLForValidateConnection(String SQLString)
Sets the value of the
SQLForValidateConnection property. |
void |
unregisterConnectionInitializationCallback()
Removes the
ConnectionInitializationCallback object registered
with this connection pool, if any. |
closeConnection, closePhysicalConnection, closeUsedPhysicalConnection, createOnePooledConnection, createOnePooledConnection, discardUsedConnection, getAvailableConnection, getStatistics, getUsedConnection, incrementCumulativeConnectionsCreated, isAffinityStrict, needToConfigureConnection, purge, recycle, refresh, returnConnection, returnUsedPhysicalConnection, setConnectionHarvestablegetAbandonedConnectionsCount, getAbandonedConnectionTimeout, getAbandonedConnectionTimer, getAvailableConnectionsCount, getAverageBorrowedConnectionsCount, getBorrowedConnectionsCount, getConnectionAffinityCallback, getConnectionFactoryAdapter, getConnectionHarvestMaxCount, getConnectionHarvestTriggerCount, getConnectionLabelingCallback, getConnectionLabelingHighCost, getConnectionRepurposeThreshold, getConnectionRetrievalInfo, getConnectionWaitTimeout, getCumulativeConnectionBorrowedCount, getCumulativeConnectionReturnedCount, getCumulativeConnectionsCreated, getCumulativeConnectionUseTime, getCumulativeFailedConnectionWaitCount, getCumulativeFailedConnectionWaitTime, getCumulativeReturnedConnectionCount, getCumulativeSuccessfulConnectionWaitCount, getCumulativeSuccessfulConnectionWaitTime, getDatabaseTopologyInfo, getFailoverEventHandlerTask, getFailoverInfo, getHighCostConnectionReuseThreshold, getInactiveConnectionTimeout, getInactiveConnectionTimer, getInitialPoolSize, getLifeCycleState, getLoginTimeout, getLogWriter, getMaxConnectionReuseCount, getMaxConnectionReuseTime, getMaxConnectionsPerService, getMaxConnectionsPerShard, getMaxPoolSize, getMinPoolSize, getName, getONSConfiguration, getPeakConnectionsCount, getPeakConnectionWaitTime, getPendingRequestsCount, getQueryTimeout, getSecondsToTrustIdleConnection, getServiceName, getShardedDatabaseInfo, getShardRoutingCacheInfo, getTimeoutCheckInterval, getTimeToLiveConnectionTimeout, getTimeToLiveConnectionTimer, getTotalConnectionsCount, getValidateConnectionOnBorrow, handleFailoverEvent, ilogFine, ilogFinest, ilogThrowing, incrementConnectionsClosedCount, incrementConnectionsCreatedCount, isFailoverEnabled, isFailoverExplicitlySet, isLifecycleFailed, isLifecycleRunning, isLifecycleStarting, isLifecycleStopped, isLifecycleStopping, isRuntimeLoadBalancingEnabled, isShareable, reconfigure, registerConnectionAffinityCallback, registerConnectionLabelingCallback, removeConnectionAffinityCallback, removeConnectionLabelingCallback, resetAllPoolStatistics, resetNonCumulativePoolStatistics, setAbandonedConnectionTimeout, setConnectionHarvestMaxCount, setConnectionHarvestTriggerCount, setConnectionLabelingHighCost, setConnectionRepurposeThreshold, setConnectionRetrievalInfo, setConnectionWaitTimeout, setFailoverEnabled, setFailoverInfo, setHighCostConnectionReuseThreshold, setInactiveConnectionTimeout, setInitialPoolSize, setLoginTimeout, setLogWriter, setMaxConnectionReuseCount, setMaxConnectionReuseTime, setMaxConnectionsPerService, setMaxConnectionsPerShard, setMaxPoolSize, setMinPoolSize, setName, setONSConfiguration, setQueryTimeout, setRuntimeLoadBalancingEnabled, setSecondsToTrustIdleConnection, setShareable, setTimeoutCheckInterval, setTimeToLiveConnectionTimeout, setValidateConnectionOnBorrow, start, stop, validatePoolSizesprotected ConnectionInitializationCallback m_connectionInitializationCallback
public JDBCConnectionPool(JDBCConnectionFactoryAdapter connectionFactoryAdapter) throws UniversalConnectionPoolException
UniversalConnectionPoolExceptionpublic void setSQLForValidateConnection(String SQLString) throws 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.SQLString - The SQL string used for connection validation.SQLExceptionpublic String getSQLForValidateConnection()
SQLForValidateConnection property.SQLForValidateConnection property value.public void setMaxStatements(int maxStatements)
throws SQLException
maxStatements - The maximum number of pooled statements.SQLExceptionpublic int getMaxStatements()
public UniversalPooledConnection borrowConnection(ConnectionRetrievalInfo connectionRetrievalInfo) throws UniversalConnectionPoolException
borrowConnection in interface UniversalConnectionPoolborrowConnection in class oracle.ucp.common.UniversalConnectionPoolImplconnectionRetrievalInfo - Info to use to get the connection.UniversalConnectionPoolException - if an error occurs getting a connection.NoAvailableConnectionsException - if all of the connections are
in use.public void registerConnectionInitializationCallback(ConnectionInitializationCallback cbk) throws UniversalConnectionPoolException
ConnectionInitializationCallback with this connection
pool.cbk - The ConnectionInitializationCallback object to be
registered.UniversalConnectionPoolException - If there is a callback already
registered with this pool.public void unregisterConnectionInitializationCallback()
throws UniversalConnectionPoolException
ConnectionInitializationCallback object registered
with this connection pool, if any.UniversalConnectionPoolException - If callback removal fails.public ConnectionInitializationCallback getConnectionInitializationCallback()
ConnectionInitializationCallback registered on the
connection pool.protected Object getConnectionObjectForLabelingConfigure(UniversalPooledConnection upc)
oracle.ucp.common.UniversalConnectionPoolImplgetConnectionObjectForLabelingConfigure in class oracle.ucp.common.UniversalConnectionPoolImpl
Copyright © 2008, 2016, Oracle. All rights reserved.