public class HAConnectionPool extends ConnectionPool implements weblogic.jdbc.common.rac.RACModulePool, HAJDBCConnectionPool
Modifier and Type | Class and Description |
---|---|
protected static class |
HAConnectionPool.HAConnectionStoreDelegate |
ConnectionPool.ConnectionStore, ConnectionPool.ConnectionStoreDelegate
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
affinityContextKey |
private ConnectionAffinityCallback.AffinityPolicy |
affinityPolicy |
private boolean |
autoOns |
private java.lang.String |
databaseName |
(package private) static int |
DRAININTERVAL |
private DataSourceServiceImpl |
dsService |
private boolean |
fanEnabled |
private java.util.concurrent.atomic.AtomicInteger |
gravitationShrinkTime |
private java.util.Map<HAJDBCConnectionPool,HADataSourceRuntime> |
haDataSourceRuntimes |
private boolean |
isxa |
private java.lang.String |
loggedServiceName |
(package private) static int |
MAXDRAIN |
private weblogic.jdbc.common.rac.RACAffinityContextHelper |
racAffinityContextHelper |
private weblogic.jdbc.common.rac.RACModule |
racModule |
private int |
rlbThreshold |
private java.lang.String |
serviceName |
private AffinityCallback |
sessionAffinityCallback |
private TransactionManager |
tm |
private AffinityCallback |
xaAffinityCallback |
classLoader, clearDBMSIdentityMethod, clientInfo, commitOutcomeRetryTotalCount, config, connectionHarvestMaxCount, connectionHarvestTriggerCount, connections, CP_PROP_CACHE_SIZE, CP_PROP_CACHE_TYPE, CP_PROP_DBG_LVL, CP_PROP_DRIVER, CP_PROP_FATAL_ERROR_CODES, CP_PROP_INIT_NAME, CP_PROP_REQUESTED_LABELS, CP_PROP_TEST_NAME, CP_PROP_URL, CP_PROP_USE_XA_INTERFACE, CURRENTINUSE, DEFAULT_WAIT, dsBean, failedRepurposeCount, harvestTime, initializationCallback, jtaDataSource, labelingCallback, localValidateOnly, oracleHelper, oracleVersion, ownerCIC, replayInitiationTimeout, replayStatisticsSnapshot, repurposeCount, resolvedAsCommittedTotalCount, resolvedAsNotCommittedTotalCount, resource, rootSwitchingContext, setDBMSIdentityMethod, sharedPool, sharedPoolReferenceCounter, SIZE, UNKNOWN, unresolvedTotalCount
allowShrinking, available, beingProcessed, capacityIncrement, countToDisablePool, countToFlushPool, dead, destroyed, disabledUponResetFailure, forSynchronizingSelfDisabling, inactiveSecs, initialCapacity, lastUsageCount, maintSecs, matchSupported, max_test_wait_millis, maxCapacity, minCapacity, name, reserved, reserveTimeoutSecs, resetFailCount, resFactory, resumeInternallyAllowed, retryIntervalSecs, returnNewlyCreatedResource, shrinkSecs, state, testOnCreate, testOnRelease, testOnReserve, testSecs, timeElapsedAfterShrinking
INFINITE_WAIT, NO_WAIT, OVERLOADED_STR, RP_GROUP_DEFAULT_NAME, RP_PROP_CAPACITY_INCREMENT, RP_PROP_CREATE_DELAY, RP_PROP_IGNORE_IN_USE_RESOURCES, RP_PROP_INACTIVE_RES_TIMEOUT_SECS, RP_PROP_INITIAL_CAPACITY, RP_PROP_MAINT_FREQ_SECS, RP_PROP_MAX_CAPACITY, RP_PROP_MAX_RESV_RETRY, RP_PROP_MAX_UNAVL, RP_PROP_MAX_WAITERS, RP_PROP_MIN_CAPACITY, RP_PROP_NAME, RP_PROP_POOL_DISABLE_THRESHOLD_CNT, RP_PROP_POOL_PURGE_THRESHOLD_CNT, RP_PROP_PROFILE_HARVEST_FREQ_SECS, RP_PROP_QUIET_MESSAGES, RP_PROP_RES_CREATION_RETRY_SECS, RP_PROP_RESV_TIMEOUT_SECS, RP_PROP_SHRINK_ENABLED, RP_PROP_SHRINK_FREQUENCY_SECS, RP_PROP_TEST_FREQUENCY_SECS, RP_PROP_TEST_ON_CREATE, RP_PROP_TEST_ON_RELEASE, RP_PROP_TEST_ON_RESERVE, RUNNING, RUNNING_STR, SHUTDOWN, SHUTDOWN_STR, SUSPENDED, SUSPENDED_STR, UNHEALTHY, UNHEALTHY_STR, UNKNOWN, UNKNOWN_STR
Constructor and Description |
---|
HAConnectionPool(JDBCDataSourceBean dsBean,
java.lang.String appName,
java.lang.String moduleName,
java.lang.String compName,
java.lang.ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
addHADataSourceRuntime(HAJDBCConnectionPool pool,
HADataSourceRuntime runtime) |
protected void |
createCollections() |
protected ConnectionPool.ConnectionStoreDelegate |
createConnectionStoreDelegate() |
HAConnectionEnv |
createConnectionToInstance(weblogic.jdbc.common.rac.RACInstance instance)
Create and return a new connection to the specified RAC instance.
|
void |
createInstanceRuntime(HAJDBCConnectionPool pool,
weblogic.common.resourcepool.ResourcePoolGroup instanceGroup,
java.lang.String instanceName) |
private void |
debug(java.lang.String msg) |
protected void |
destroyResource(weblogic.common.resourcepool.PooledResource res) |
protected boolean |
disableGroupOnTestFailCount() |
private boolean |
doDraining() |
boolean |
doDraining(HAJDBCConnectionPool haPool) |
private void |
doGravitation() |
private void |
doHarvest(java.util.List<java.lang.String> instanceNames,
boolean draining) |
private java.lang.String |
extractAttributeValueFromURL(java.lang.String key,
java.lang.String url) |
void |
fcfDownEvent(HAJDBCConnectionPool haPool,
weblogic.jdbc.common.rac.RACModule racModule,
weblogic.jdbc.common.rac.RACModuleFailoverEvent event) |
void |
fcfDownEvent(weblogic.jdbc.common.rac.RACModuleFailoverEvent event)
Process a down event.
|
int |
fcfUpEvent(HAJDBCConnectionPool haPool,
weblogic.jdbc.common.rac.RACModule racModule,
weblogic.jdbc.common.rac.RACModuleFailoverEvent event) |
int |
fcfUpEvent(weblogic.jdbc.common.rac.RACModuleFailoverEvent event)
Process an up event.
|
void |
forceShutdownExternal() |
void |
forceSuspend(boolean shuttingDown) |
void |
forceSuspendExternal() |
boolean |
getAffForInstance(java.lang.String instanceName) |
java.lang.String |
getAffinityContextKey() |
ConnectionAffinityCallback.AffinityPolicy |
getAffinityPolicy()
Returns the preferred affinity policy of the pool
|
void |
getAvailableAndBorrowedConnections(java.util.List<weblogic.common.resourcepool.PooledResource> available,
java.util.List<weblogic.common.resourcepool.PooledResource> borrowed) |
void |
getAvailableAndBorrowedConnections(java.util.List<weblogic.common.resourcepool.PooledResource> available,
java.util.List<weblogic.common.resourcepool.PooledResource> borrowed,
java.util.List<java.lang.String> instances,
boolean removeAvailable) |
java.util.List<weblogic.common.resourcepool.PooledResource> |
getAvailableConnections(weblogic.jdbc.common.rac.RACInstance instance,
boolean remove) |
HAConnectionEnv |
getConnectionToInstance(weblogic.jdbc.common.rac.RACInstance instance,
int waitSeconds,
java.util.Properties requestedLabels)
Attempt to get an existing or new connection to instance.
|
int |
getCurrentPoolCapacity()
Returns the number of connections in the pool
|
DataAffinityCallback |
getDataAffinityCallback()
Returns the registered data affinity callback or null if not registered.
|
java.lang.String |
getDatabaseName()
Returns the database name for the pool
|
weblogic.jdbc.common.rac.RACConnectionEnv |
getExistingConnection(int waitSeconds,
java.util.Properties requestedLabels)
Returns any existing connection.
|
HAConnectionEnv |
getExistingConnectionToInstance(HAJDBCConnectionPool haPool,
weblogic.jdbc.common.rac.RACInstance instance,
int waitSeconds,
java.util.Properties requestedLabels) |
HAConnectionEnv |
getExistingConnectionToInstance(weblogic.jdbc.common.rac.RACInstance instance,
int waitSeconds,
java.util.Properties requestedLabels)
Returns a connection to the specified RAC instance if one already exists in
the pool.
|
long |
getFailedAffinityBasedBorrowCount() |
long |
getFailedRCLBBasedBorrowCount() |
weblogic.common.resourcepool.ResourcePoolGroup |
getGroupForInstance(java.lang.String instance) |
private int |
getInitialCapacity() |
java.lang.String |
getJDBCURL()
Returns the JDBC URL that has been configured for this pool.
|
int |
getMaxPoolSize()
Returns the maximum capacity of the pool
|
int |
getMinPoolSize()
Returns the minimum capacity of the pool
|
(package private) weblogic.common.resourcepool.PooledResourceInfo |
getPooledResourceInfo(weblogic.jdbc.common.rac.RACInstance instance) |
weblogic.common.resourcepool.PooledResourceInfo |
getPooledResourceInfo(weblogic.jdbc.common.rac.RACInstance instance,
java.util.Properties labels) |
weblogic.common.resourcepool.ResourcePoolGroup |
getPoolGroup() |
java.lang.String |
getPoolName()
The name that identifies the pool.
|
weblogic.jdbc.common.rac.RACModule |
getRACModule() |
private int |
getRemainingCapacity() |
int |
getRemainingPoolCapacity()
Returns the remaining, unallocated capacity of the pool.
|
java.util.List<weblogic.common.resourcepool.PooledResource> |
getReservedConnections(weblogic.jdbc.common.rac.RACInstance instance) |
private java.util.List<weblogic.common.resourcepool.PooledResource> |
getReservedConnectionsForInstance(weblogic.jdbc.common.rac.RACInstance instance) |
java.lang.String |
getServiceName()
Returns the service name for the pool
|
AffinityCallback |
getSessionAffinityCallback()
Returns the registered session affinity callback or null if not registered.
|
weblogic.jdbc.common.rac.RACModulePool |
getSharedRACModulePool()
Returns the shared pool if sharing enabled, or itself
|
long |
getSuccessfulAffinityBasedBorrowCount() |
long |
getSuccessfulRCLBBasedBorrowCount() |
int |
getWeightForInstance(java.lang.String instanceName) |
AffinityCallback |
getXAAffinityCallback()
Returns the registered transaction affinity callback or null if not registered.
|
private void |
init() |
void |
initAffinityKeyIfNecessary()
Initializes database state used for constructing RACInstance instances for
use in affinity contexts, etc.
|
private void |
initDatabaseServiceNames(weblogic.jdbc.common.rac.RACInstance racInstance) |
void |
initOns() |
void |
initOns(weblogic.jdbc.common.rac.RACModule racModule) |
void |
initOracleHelper() |
protected boolean |
isRootPartitionGroupEnabled(ConnectionEnv ce)
For generic DS (non-RAC) return the state of the connection pool
|
boolean |
isXA() |
private boolean |
locateConnectionsToDrain(HAJDBCConnectionPool haPool,
weblogic.jdbc.common.rac.RACInstance instance,
java.util.List<weblogic.jdbc.common.rac.RACConnectionEnv> toDestroy,
int drainCnt) |
private boolean |
locateConnectionsToDrain(weblogic.jdbc.common.rac.RACInstance instance,
java.util.List<weblogic.jdbc.common.rac.RACConnectionEnv> toDestroy,
int drainCnt) |
private weblogic.jdbc.common.rac.RACConnectionEnv |
locateConnectionToDestroy(weblogic.jdbc.common.rac.RACInstance instance,
java.util.List<weblogic.jdbc.common.rac.RACConnectionEnv> toDestroy,
weblogic.common.resourcepool.ResourcePoolGroup g,
int capacity) |
void |
markConnectionGood(ConnectionEnv pooledConnection) |
weblogic.common.resourcepool.PooledResource |
matchResource(weblogic.common.resourcepool.PooledResourceInfo pri) |
private HAConnectionEnv |
openConnectionToInstance(weblogic.jdbc.common.rac.RACInstance instance,
boolean reserve,
java.util.Properties additionalProperties) |
void |
performMaintenance() |
protected void |
processFailCountExceededDisableThreshold() |
void |
release(ConnectionEnv resource)
Releases connection back to the pool.
|
protected void |
releasePinnedToThread(ConnectionEnv resource) |
boolean |
removeFromAvailableForProcessing(java.util.List<weblogic.common.resourcepool.PooledResource> resources) |
HADataSourceRuntime |
removeHADataSourceRuntime(HAJDBCConnectionPool pool) |
void |
removePooledResource(weblogic.jdbc.common.rac.RACConnectionEnv conn)
Removes the specified connection from the pool.
|
protected void |
replayUpdateConnectionState(ConnectionEnv pooledConnection) |
ConnectionEnv |
reserve(weblogic.security.acl.internal.AuthenticatedSubject user,
int waitSeconds,
java.util.Properties requestedLabels,
java.lang.String username,
java.lang.String password) |
ConnectionEnv |
reserve(weblogic.jdbc.common.rac.RACModule racModule,
weblogic.security.acl.internal.AuthenticatedSubject user,
int waitSeconds,
java.util.Properties requestedLabels,
java.lang.String username,
java.lang.String password) |
HAConnectionEnv |
reserveInternalResource()
Returns a connection from the pool for internal use.
|
protected ConnectionEnv |
reservePinnedToThread(int waitSeconds,
boolean internalUse) |
private ConnectionEnv |
reserveWithTxAffinity(weblogic.security.acl.internal.AuthenticatedSubject user,
int waitSeconds,
java.util.Properties requestedLabels) |
void |
resume() |
void |
resumeExternal() |
protected void |
setAffinityContextKeyNameIfNecessary(weblogic.jdbc.common.rac.RACInstance racInstance) |
void |
setFanEnabled(boolean enabled) |
private void |
setTxAffinityContext(ConnectionEnv ce) |
private void |
setUCPTransactionAffinityContext(ConnectionEnv ce) |
void |
shutdown() |
void |
shutdownExternal(int operationSecs) |
void |
start(java.lang.Object unused) |
void |
startExternal() |
private void |
stopRACModule() |
void |
suspend(boolean shuttingDown) |
void |
suspendExternal(int operationSecs) |
private void |
switchToRootPartitionAndMakeAvailable(ConnectionEnv ce) |
private void |
turnOffDraining(HAJDBCConnectionPool haPool) |
areConnsBeingTested, clearDBMSIdentity, clearReplayStatistics, clearStatementCache, clearUserCache, connectionCallbacks, continueMakeResourceAttemptsAfterFailure, deactivate, decrementSharedPoolReferenceCounter, destroyMatchingAvailableAndReservedConnections, disableCountOfRefreshFailuresTillDisable, disableDroppingUsers, disableFreezingUsers, doAuthorizationCheck, doHarvest, enable, endRequest, getAppName, getAuthorizationCallable, getAvailableMatching, getCachedPooledResource, getClassLoader, getCommitOutcomeRetryTotalCount, getCompName, getComponentInvocationContextManager, getConfig, getConnectionHarvestMaxCount, getConnectionHarvestTriggerCount, getDBMSIdentity, getDriverClass, getDriverInterceptor, getDriverVersion, getFailedRepurposeCount, getGroup, getInactiveSeconds, getInfo, getInitializationCallback, getJDBCDataSource, getJTADataSource, getLabelingCallback, getMaintainer, getModuleName, getName, getOracleHelper, getOracleVersion, getOrCreateGroup, getPartitionName, getPrepStmtCacheAccessCount, getPrepStmtCacheAddCount, getPrepStmtCacheCurrentSize, getPrepStmtCacheDeleteCount, getPrepStmtCacheHitCount, getPrepStmtCacheMissCount, getProfiler, getProperties, getReplayInitiationTimeout, getReplayStatistics, getReplayStatisticsSnapshot, getRepurposeCount, getReservedMatching, getReserveReleaseInterceptor, getResolvedAsCommittedTotalCount, getResolvedAsNotCommittedTotalCount, getResourceFactory, getResourceName, getRootSwitchingContext, getSharedPoolReferenceCounter, getStateAsInt, getTestOnCreate, getTestOnRelease, getTestOnReserve, getTestSeconds, getUnresolvedTotalCount, getURL, getXARetryDurationSeconds, incrementCommitOutcomeRetryTotalCount, incrementLeakedConnectionCount, incrementResolvedAsCommittedTotalCount, incrementResolvedAsNotCommittedTotalCount, incrementSharedPoolReferenceCounter, incrementUnresolvedTotalCount, initOwnerCIC, initPooledResourceFactory, isCreateConnectionInline, isCredentialMappingEnabled, isEnabled, isIdentityBasedConnectionPoolingEnabled, isLocalValidateOnly, isMemberDS, isNativeXA, isOracleOptimizeUtf8Conversion, isOracleProxySession, isRemoveInfectedConnectionEnabled, isSharedPool, isSharingPool, isWrapJdbc, isWrapTypes, makeResource, onRelease, onReserve, poolExists, preventSelfResuming, processOracleProxySession, putCachedPooledResource, refresh, refreshOldestAvailResource, removeCachedPooledResource, removeConnection, removeResource, replayInitialize, replayInvokeInitializeCallbacks, repurposeMatchingAvailableAndReservedConnections, reserve, reserve, reserve, reserve, reserveInternal, reset, resetStatistics, returnNewlyCreatedResource, setConnectionHarvestMaxCount, setConnectionHarvestTriggerCount, setCountOfRefreshFailuresTillDisable, setCountOfTestFailuresTillFlush, setDataSource, setDBMSIdentity, setInitializationCallback, setJDBCDataSource, setLabelingCallback, setMaintenanceFrequencySeconds, setOracleOptimizeUtf8Conversion, setProfileConnectionLeakTimeoutSeconds, setProfileType, setReplayInitiationTimeout, setRootSwitchingContext, setSecondsToTrustAnIdlePoolConnection, setShrinkFrequencySeconds, setStatementCacheSize, setTestFrequencySeconds, setTestTableName, setupConnectionHarvesting, setupConnectionInitializationCallback, setupConnectionLabelingCallback, setupDriverInterceptor, setWrapJdbc, setWrapTypes, shrink, start, suspend, switchToRootPartition, updateCredential, updateGroups, waitForNoReservedMatching
addGroup, checkHangForAllGroups, createResources, createResources, decrementGroupCapacities, dumpPool, forceDestroyResource, getAverageReserved, getCreationDelayTime, getCurrCapacity, getDerivedState, getGroups, getGroups, getHighestCurrCapacity, getHighestNumAvailable, getHighestNumReserved, getHighestNumUnavailable, getHighestNumWaiters, getHighestWaitSeconds, getLastShrinkTime, getMaxCapacity, getMinCapacity, getNumAvailable, getNumFailedReserveRequests, getNumFailuresToRefresh, getNumIdleDetected, getNumLeaked, getNumReserved, getNumReserveRequests, getNumUnavailable, getNumWaiters, getResources, getResourcesDestroyedByShrinkingCount, getState, getTimeToNextShrinkOperation, getTotalNumAllocated, getTotalNumDestroyed, getTotalWaitingForConnection, getTotalWaitingForConnectionFailure, getTotalWaitingForConnectionSuccess, incrementGroupCapacities, incrementGroupCreatedCounts, incrementNumLeaked, incrementResourcesDestroyedByShrinkingCount, initParameters, makeResources, makeResources, makeResources, makeResources, refresh, releaseResource, reserveResource, reserveResource, reserveResource, reserveResource, setCapacityIncrement, setHighestNumUnavailable, setHighestNumWaiters, setIgnoreInUseResources, setInactiveResourceTimeoutSeconds, setInitialCapacity, setMaximumCapacity, setMinimumCapacity, setProfileHarvestFrequencySeconds, setResourceCreationRetrySeconds, setResourceReserveTimeoutSeconds, setShrinkEnabled, setShrinkFactor, setTestOnCreate, setTestOnRelease, setTestOnReserve, zeroResetFailCount
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSharedPool, isSharingPool, switchToRootPartition
getDriverClass, replayInitialize
areConnsBeingTested, clearDBMSIdentity, clearReplayStatistics, clearStatementCache, connectionCallbacks, decrementSharedPoolReferenceCounter, destroyMatchingAvailableAndReservedConnections, dumpPool, getAppName, getAvailableMatching, getCachedPooledResource, getClassLoader, getCommitOutcomeRetryTotalCount, getCompName, getConnectionHarvestTriggerCount, getDBMSIdentity, getDerivedState, getDriverInterceptor, getDriverVersion, getFailedRepurposeCount, getGroup, getGroups, getInactiveSeconds, getInitializationCallback, getJDBCDataSource, getJTADataSource, getLabelingCallback, getModuleName, getName, getOracleHelper, getOracleVersion, getOrCreateGroup, getPartitionName, getPrepStmtCacheAccessCount, getPrepStmtCacheAddCount, getPrepStmtCacheCurrentSize, getPrepStmtCacheDeleteCount, getPrepStmtCacheHitCount, getPrepStmtCacheMissCount, getProfiler, getProperties, getReplayInitiationTimeout, getReplayStatistics, getReplayStatisticsSnapshot, getRepurposeCount, getReservedMatching, getResolvedAsCommittedTotalCount, getResolvedAsNotCommittedTotalCount, getResourceFactory, getRootSwitchingContext, getStateAsInt, getTestOnReserve, getTestSeconds, getUnresolvedTotalCount, getURL, getXARetryDurationSeconds, incrementCommitOutcomeRetryTotalCount, incrementLeakedConnectionCount, incrementResolvedAsCommittedTotalCount, incrementResolvedAsNotCommittedTotalCount, incrementSharedPoolReferenceCounter, incrementUnresolvedTotalCount, isCreateConnectionInline, isCredentialMappingEnabled, isEnabled, isIdentityBasedConnectionPoolingEnabled, isLocalValidateOnly, isMemberDS, isNativeXA, isOracleOptimizeUtf8Conversion, isRemoveInfectedConnectionEnabled, isSharedPool, isSharingPool, isWrapJdbc, isWrapTypes, poolExists, putCachedPooledResource, removeCachedPooledResource, removeConnection, removeResource, repurposeMatchingAvailableAndReservedConnections, reserve, reserveInternal, reset, setConnectionHarvestMaxCount, setConnectionHarvestTriggerCount, setDataSource, setDBMSIdentity, setInitializationCallback, setJDBCDataSource, setLabelingCallback, setOracleOptimizeUtf8Conversion, setProfileConnectionLeakTimeoutSeconds, setProfileType, setReplayInitiationTimeout, setRootSwitchingContext, setSecondsToTrustAnIdlePoolConnection, setStatementCacheSize, setTestTableName, start, updateCredential, waitForNoReservedMatching, zeroResetFailCount
createResources, createResources, getAverageReserved, getCreationDelayTime, getCurrCapacity, getHighestCurrCapacity, getHighestNumAvailable, getHighestNumReserved, getHighestNumUnavailable, getHighestNumWaiters, getHighestWaitSeconds, getMaintainer, getMaxCapacity, getMinCapacity, getNumAvailable, getNumFailedReserveRequests, getNumFailuresToRefresh, getNumLeaked, getNumReserved, getNumReserveRequests, getNumUnavailable, getNumWaiters, getReserveReleaseInterceptor, getResources, getState, getTotalNumAllocated, getTotalNumDestroyed, getTotalWaitingForConnection, getTotalWaitingForConnectionFailure, getTotalWaitingForConnectionSuccess, incrementNumLeaked, initPooledResourceFactory, refresh, releaseResource, reserveResource, reserveResource, resetStatistics, setCapacityIncrement, setCountOfRefreshFailuresTillDisable, setCountOfTestFailuresTillFlush, setHighestNumUnavailable, setHighestNumWaiters, setIgnoreInUseResources, setInactiveResourceTimeoutSeconds, setInitialCapacity, setMaintenanceFrequencySeconds, setMaximumCapacity, setMinimumCapacity, setProfileHarvestFrequencySeconds, setResourceCreationRetrySeconds, setResourceReserveTimeoutSeconds, setShrinkEnabled, setShrinkFrequencySeconds, setTestFrequencySeconds, setTestOnCreate, setTestOnRelease, setTestOnReserve, shrink
private weblogic.jdbc.common.rac.RACModule racModule
private java.lang.String serviceName
private java.lang.String loggedServiceName
private java.lang.String databaseName
private boolean fanEnabled
private java.lang.String affinityContextKey
private TransactionManager tm
private boolean isxa
private int rlbThreshold
private DataSourceServiceImpl dsService
private ConnectionAffinityCallback.AffinityPolicy affinityPolicy
private AffinityCallback xaAffinityCallback
private AffinityCallback sessionAffinityCallback
private java.util.concurrent.atomic.AtomicInteger gravitationShrinkTime
private weblogic.jdbc.common.rac.RACAffinityContextHelper racAffinityContextHelper
private boolean autoOns
private java.util.Map<HAJDBCConnectionPool,HADataSourceRuntime> haDataSourceRuntimes
static int MAXDRAIN
static int DRAININTERVAL
public HAConnectionPool(JDBCDataSourceBean dsBean, java.lang.String appName, java.lang.String moduleName, java.lang.String compName, java.lang.ClassLoader classLoader)
public void setFanEnabled(boolean enabled) throws ResourceException
ResourceException
private void init()
public boolean isXA()
isXA
in interface HAJDBCConnectionPool
private java.lang.String extractAttributeValueFromURL(java.lang.String key, java.lang.String url)
public java.lang.String getServiceName()
weblogic.jdbc.common.rac.RACModulePool
getServiceName
in interface HAJDBCConnectionPool
getServiceName
in interface weblogic.jdbc.common.rac.RACModulePool
public java.lang.String getDatabaseName()
weblogic.jdbc.common.rac.RACModulePool
getDatabaseName
in interface HAJDBCConnectionPool
getDatabaseName
in interface weblogic.jdbc.common.rac.RACModulePool
protected void releasePinnedToThread(ConnectionEnv resource) throws ResourceException
releasePinnedToThread
in class ConnectionPool
ResourceException
protected ConnectionEnv reservePinnedToThread(int waitSeconds, boolean internalUse) throws ResourceException, weblogic.common.resourcepool.ResourceDisabledException
reservePinnedToThread
in class ConnectionPool
ResourceException
weblogic.common.resourcepool.ResourceDisabledException
public ConnectionEnv reserve(weblogic.security.acl.internal.AuthenticatedSubject user, int waitSeconds, java.util.Properties requestedLabels, java.lang.String username, java.lang.String password) throws ResourceException
reserve
in interface JDBCConnectionPool
reserve
in class ConnectionPool
ResourceException
public ConnectionEnv reserve(weblogic.jdbc.common.rac.RACModule racModule, weblogic.security.acl.internal.AuthenticatedSubject user, int waitSeconds, java.util.Properties requestedLabels, java.lang.String username, java.lang.String password) throws ResourceException
reserve
in interface HAJDBCConnectionPool
ResourceException
public void release(ConnectionEnv resource) throws ResourceException
weblogic.jdbc.common.rac.RACModulePool
release
in interface JDBCConnectionPool
release
in interface weblogic.jdbc.common.rac.RACModulePool
release
in class ConnectionPool
resource
- The pooled resource to release.ResourceException
protected void destroyResource(weblogic.common.resourcepool.PooledResource res)
destroyResource
in class weblogic.common.resourcepool.ResourcePoolImpl
protected void createCollections()
createCollections
in class ConnectionPool
public void activate() throws java.lang.IllegalStateException, ResourceException
activate
in class ConnectionPool
java.lang.IllegalStateException
ResourceException
public void forceShutdownExternal() throws ResourceException
forceShutdownExternal
in interface JDBCConnectionPool
forceShutdownExternal
in class ConnectionPool
ResourceException
public void forceSuspend(boolean shuttingDown) throws ResourceException
forceSuspend
in interface weblogic.common.resourcepool.ObjectLifeCycle
forceSuspend
in class ConnectionPool
ResourceException
public void forceSuspendExternal() throws ResourceException
forceSuspendExternal
in interface JDBCConnectionPool
forceSuspendExternal
in class ConnectionPool
ResourceException
public void resume() throws ResourceException
resume
in interface weblogic.common.resourcepool.ObjectLifeCycle
resume
in class ConnectionPool
ResourceException
public void resumeExternal() throws ResourceException
resumeExternal
in interface JDBCConnectionPool
resumeExternal
in class ConnectionPool
ResourceException
public void shutdown() throws ResourceException
shutdown
in interface weblogic.common.resourcepool.ObjectLifeCycle
shutdown
in class ConnectionPool
ResourceException
public void shutdownExternal(int operationSecs) throws ResourceException
shutdownExternal
in interface JDBCConnectionPool
shutdownExternal
in class ConnectionPool
ResourceException
public void start(java.lang.Object unused) throws ResourceException
start
in interface weblogic.common.resourcepool.ObjectLifeCycle
start
in class ConnectionPool
ResourceException
public void startExternal() throws ResourceException
startExternal
in interface JDBCConnectionPool
startExternal
in class ConnectionPool
ResourceException
public void suspend(boolean shuttingDown) throws ResourceException
suspend
in interface weblogic.common.resourcepool.ObjectLifeCycle
suspend
in class weblogic.common.resourcepool.ResourcePoolImpl
ResourceException
public void suspendExternal(int operationSecs) throws ResourceException
suspendExternal
in interface JDBCConnectionPool
suspendExternal
in class ConnectionPool
ResourceException
public void addHADataSourceRuntime(HAJDBCConnectionPool pool, HADataSourceRuntime runtime)
addHADataSourceRuntime
in interface HAJDBCConnectionPool
public HADataSourceRuntime removeHADataSourceRuntime(HAJDBCConnectionPool pool)
removeHADataSourceRuntime
in interface HAJDBCConnectionPool
public void createInstanceRuntime(HAJDBCConnectionPool pool, weblogic.common.resourcepool.ResourcePoolGroup instanceGroup, java.lang.String instanceName)
createInstanceRuntime
in interface HAJDBCConnectionPool
public void performMaintenance()
performMaintenance
in interface weblogic.common.resourcepool.ResourcePoolMaintainer
performMaintenance
in class ConnectionPool
private void doGravitation()
private boolean doDraining()
public boolean doDraining(HAJDBCConnectionPool haPool)
doDraining
in interface HAJDBCConnectionPool
private boolean locateConnectionsToDrain(weblogic.jdbc.common.rac.RACInstance instance, java.util.List<weblogic.jdbc.common.rac.RACConnectionEnv> toDestroy, int drainCnt)
private boolean locateConnectionsToDrain(HAJDBCConnectionPool haPool, weblogic.jdbc.common.rac.RACInstance instance, java.util.List<weblogic.jdbc.common.rac.RACConnectionEnv> toDestroy, int drainCnt)
private weblogic.jdbc.common.rac.RACConnectionEnv locateConnectionToDestroy(weblogic.jdbc.common.rac.RACInstance instance, java.util.List<weblogic.jdbc.common.rac.RACConnectionEnv> toDestroy, weblogic.common.resourcepool.ResourcePoolGroup g, int capacity)
public long getFailedRCLBBasedBorrowCount()
getFailedRCLBBasedBorrowCount
in interface HAJDBCConnectionPool
public long getSuccessfulRCLBBasedBorrowCount()
getSuccessfulRCLBBasedBorrowCount
in interface HAJDBCConnectionPool
public long getFailedAffinityBasedBorrowCount()
getFailedAffinityBasedBorrowCount
in interface HAJDBCConnectionPool
public long getSuccessfulAffinityBasedBorrowCount()
getSuccessfulAffinityBasedBorrowCount
in interface HAJDBCConnectionPool
protected void processFailCountExceededDisableThreshold()
processFailCountExceededDisableThreshold
in class weblogic.common.resourcepool.ResourcePoolImpl
public void initOracleHelper() throws ResourceException
initOracleHelper
in class ConnectionPool
ResourceException
public void initOns() throws ResourceException
ResourceException
public void initOns(weblogic.jdbc.common.rac.RACModule racModule) throws ResourceException
initOns
in interface HAJDBCConnectionPool
ResourceException
private void stopRACModule() throws ResourceException
ResourceException
public weblogic.jdbc.common.rac.RACModule getRACModule()
getRACModule
in interface HAJDBCConnectionPool
private int getInitialCapacity()
private int getRemainingCapacity()
private HAConnectionEnv openConnectionToInstance(weblogic.jdbc.common.rac.RACInstance instance, boolean reserve, java.util.Properties additionalProperties) throws ResourceException
ResourceException
weblogic.common.resourcepool.PooledResourceInfo getPooledResourceInfo(weblogic.jdbc.common.rac.RACInstance instance)
public weblogic.common.resourcepool.PooledResourceInfo getPooledResourceInfo(weblogic.jdbc.common.rac.RACInstance instance, java.util.Properties labels)
getPooledResourceInfo
in interface HAJDBCConnectionPool
public int getWeightForInstance(java.lang.String instanceName)
getWeightForInstance
in interface HAJDBCConnectionPool
public boolean getAffForInstance(java.lang.String instanceName)
getAffForInstance
in interface HAJDBCConnectionPool
public void getAvailableAndBorrowedConnections(java.util.List<weblogic.common.resourcepool.PooledResource> available, java.util.List<weblogic.common.resourcepool.PooledResource> borrowed)
getAvailableAndBorrowedConnections
in interface HAJDBCConnectionPool
public void getAvailableAndBorrowedConnections(java.util.List<weblogic.common.resourcepool.PooledResource> available, java.util.List<weblogic.common.resourcepool.PooledResource> borrowed, java.util.List<java.lang.String> instances, boolean removeAvailable)
getAvailableAndBorrowedConnections
in interface HAJDBCConnectionPool
public java.util.List<weblogic.common.resourcepool.PooledResource> getAvailableConnections(weblogic.jdbc.common.rac.RACInstance instance, boolean remove)
getAvailableConnections
in interface HAJDBCConnectionPool
public java.util.List<weblogic.common.resourcepool.PooledResource> getReservedConnections(weblogic.jdbc.common.rac.RACInstance instance)
getReservedConnections
in interface HAJDBCConnectionPool
private java.util.List<weblogic.common.resourcepool.PooledResource> getReservedConnectionsForInstance(weblogic.jdbc.common.rac.RACInstance instance)
public java.lang.String getAffinityContextKey()
getAffinityContextKey
in interface HAJDBCConnectionPool
public void initAffinityKeyIfNecessary() throws ResourceException
weblogic.jdbc.common.rac.RACModulePool
initAffinityKeyIfNecessary
in interface HAJDBCConnectionPool
initAffinityKeyIfNecessary
in interface weblogic.jdbc.common.rac.RACModulePool
ResourceException
- An error occured trying to establish connection to the databaseprivate void initDatabaseServiceNames(weblogic.jdbc.common.rac.RACInstance racInstance)
protected void setAffinityContextKeyNameIfNecessary(weblogic.jdbc.common.rac.RACInstance racInstance)
private ConnectionEnv reserveWithTxAffinity(weblogic.security.acl.internal.AuthenticatedSubject user, int waitSeconds, java.util.Properties requestedLabels) throws ResourceException
ResourceException
private void setTxAffinityContext(ConnectionEnv ce)
private void setUCPTransactionAffinityContext(ConnectionEnv ce)
public HAConnectionEnv getConnectionToInstance(weblogic.jdbc.common.rac.RACInstance instance, int waitSeconds, java.util.Properties requestedLabels) throws ResourceException
ResourceException
public HAConnectionEnv getExistingConnectionToInstance(weblogic.jdbc.common.rac.RACInstance instance, int waitSeconds, java.util.Properties requestedLabels) throws ResourceException
weblogic.jdbc.common.rac.RACModulePool
getExistingConnectionToInstance
in interface weblogic.jdbc.common.rac.RACModulePool
instance
- The desired RAC instance.waitSeconds
- The number of seconds to wait for a connection.requestedLabels
- The set of labels to use to match a connection.ResourceException
- An error occurred.public HAConnectionEnv getExistingConnectionToInstance(HAJDBCConnectionPool haPool, weblogic.jdbc.common.rac.RACInstance instance, int waitSeconds, java.util.Properties requestedLabels) throws ResourceException
getExistingConnectionToInstance
in interface HAJDBCConnectionPool
ResourceException
public weblogic.jdbc.common.rac.RACConnectionEnv getExistingConnection(int waitSeconds, java.util.Properties requestedLabels) throws ResourceException
weblogic.jdbc.common.rac.RACModulePool
getExistingConnection
in interface weblogic.jdbc.common.rac.RACModulePool
waitSeconds
- The number of seconds to wait for a connetion.requestedLabels
- The set of labels to use to match a connection.ResourceException
- An error occurred.public void removePooledResource(weblogic.jdbc.common.rac.RACConnectionEnv conn) throws ResourceException
weblogic.jdbc.common.rac.RACModulePool
removePooledResource
in interface weblogic.jdbc.common.rac.RACModulePool
conn
- The connection to removeResourceException
- An error occurred.public HAConnectionEnv createConnectionToInstance(weblogic.jdbc.common.rac.RACInstance instance) throws ResourceException
weblogic.jdbc.common.rac.RACModulePool
createConnectionToInstance
in interface weblogic.jdbc.common.rac.RACModulePool
instance
- The desired instance to which to create the connection.ResourceException
- An error occurred.public int getMaxPoolSize()
weblogic.jdbc.common.rac.RACModulePool
getMaxPoolSize
in interface weblogic.jdbc.common.rac.RACModulePool
public int getMinPoolSize()
weblogic.jdbc.common.rac.RACModulePool
getMinPoolSize
in interface weblogic.jdbc.common.rac.RACModulePool
public java.lang.String getPoolName()
weblogic.jdbc.common.rac.RACModulePool
getPoolName
in interface weblogic.jdbc.common.rac.RACModulePool
public int getRemainingPoolCapacity()
weblogic.jdbc.common.rac.RACModulePool
getRemainingPoolCapacity
in interface weblogic.jdbc.common.rac.RACModulePool
public int getCurrentPoolCapacity()
weblogic.jdbc.common.rac.RACModulePool
getCurrentPoolCapacity
in interface weblogic.jdbc.common.rac.RACModulePool
public java.lang.String getJDBCURL()
weblogic.jdbc.common.rac.RACModulePool
getJDBCURL
in interface weblogic.jdbc.common.rac.RACModulePool
public void fcfDownEvent(weblogic.jdbc.common.rac.RACModuleFailoverEvent event) throws ResourceException
weblogic.jdbc.common.rac.RACModulePool
fcfDownEvent
in interface weblogic.jdbc.common.rac.RACModulePool
event
- The incoming FAN event.ResourceException
- An error occurred.public void fcfDownEvent(HAJDBCConnectionPool haPool, weblogic.jdbc.common.rac.RACModule racModule, weblogic.jdbc.common.rac.RACModuleFailoverEvent event) throws ResourceException
fcfDownEvent
in interface HAJDBCConnectionPool
ResourceException
public weblogic.common.resourcepool.ResourcePoolGroup getPoolGroup()
getPoolGroup
in interface HAJDBCConnectionPool
public weblogic.common.resourcepool.ResourcePoolGroup getGroupForInstance(java.lang.String instance)
getGroupForInstance
in interface HAJDBCConnectionPool
public int fcfUpEvent(weblogic.jdbc.common.rac.RACModuleFailoverEvent event) throws ResourceException
weblogic.jdbc.common.rac.RACModulePool
fcfUpEvent
in interface weblogic.jdbc.common.rac.RACModulePool
event
- The incoming FAN event.ResourceException
- An error occurred.public int fcfUpEvent(HAJDBCConnectionPool haPool, weblogic.jdbc.common.rac.RACModule racModule, weblogic.jdbc.common.rac.RACModuleFailoverEvent event) throws ResourceException
fcfUpEvent
in interface HAJDBCConnectionPool
ResourceException
public ConnectionAffinityCallback.AffinityPolicy getAffinityPolicy()
weblogic.jdbc.common.rac.RACModulePool
getAffinityPolicy
in interface weblogic.jdbc.common.rac.RACModulePool
public DataAffinityCallback getDataAffinityCallback()
weblogic.jdbc.common.rac.RACModulePool
getDataAffinityCallback
in interface weblogic.jdbc.common.rac.RACModulePool
public AffinityCallback getSessionAffinityCallback()
weblogic.jdbc.common.rac.RACModulePool
getSessionAffinityCallback
in interface weblogic.jdbc.common.rac.RACModulePool
public AffinityCallback getXAAffinityCallback()
weblogic.jdbc.common.rac.RACModulePool
getXAAffinityCallback
in interface weblogic.jdbc.common.rac.RACModulePool
public weblogic.jdbc.common.rac.RACModulePool getSharedRACModulePool()
weblogic.jdbc.common.rac.RACModulePool
getSharedRACModulePool
in interface weblogic.jdbc.common.rac.RACModulePool
public void markConnectionGood(ConnectionEnv pooledConnection)
markConnectionGood
in class ConnectionPool
public weblogic.common.resourcepool.PooledResource matchResource(weblogic.common.resourcepool.PooledResourceInfo pri) throws ResourceException
matchResource
in interface weblogic.common.resourcepool.ResourcePool
matchResource
in class ConnectionPool
ResourceException
protected boolean disableGroupOnTestFailCount()
disableGroupOnTestFailCount
in class weblogic.common.resourcepool.ResourcePoolImpl
protected boolean isRootPartitionGroupEnabled(ConnectionEnv ce)
ConnectionPool
isRootPartitionGroupEnabled
in class ConnectionPool
public boolean removeFromAvailableForProcessing(java.util.List<weblogic.common.resourcepool.PooledResource> resources)
removeFromAvailableForProcessing
in interface HAJDBCConnectionPool
protected void replayUpdateConnectionState(ConnectionEnv pooledConnection) throws java.sql.SQLException
replayUpdateConnectionState
in class ConnectionPool
java.sql.SQLException
private void doHarvest(java.util.List<java.lang.String> instanceNames, boolean draining)
private void turnOffDraining(HAJDBCConnectionPool haPool)
private void switchToRootPartitionAndMakeAvailable(ConnectionEnv ce)
private final void debug(java.lang.String msg)
protected ConnectionPool.ConnectionStoreDelegate createConnectionStoreDelegate()
createConnectionStoreDelegate
in class ConnectionPool
public HAConnectionEnv reserveInternalResource() throws ResourceException
weblogic.jdbc.common.rac.RACModulePool
reserveInternalResource
in interface weblogic.jdbc.common.rac.RACModulePool
ResourceException