Package com.sun.enterprise.resource.pool
Class UnpooledResource
- java.lang.Object
-
- com.sun.enterprise.resource.pool.ConnectionPool
-
- com.sun.enterprise.resource.pool.UnpooledResource
-
- All Implemented Interfaces:
ConnectionLeakListener,PoolProperties,ResourceHandler,ResourcePool
public class UnpooledResource extends ConnectionPool
This resource pool is created when connection pooling is switched off Hence no pooling happens in this resource pool- Since:
- 9.1
- Author:
- Kshitiz Saxena
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.resource.pool.ConnectionPool
_logger, allocator, conCreationRetryInterval_, connectionCreationRetry_, connectionCreationRetryAttempts_, dataStructureParameters, dataStructureType, ds, failAllConnections, gateway, idletime, leakDetector, localStrings, matchConnections, maxConnectionUsage_, maxPoolSize, maxWaitTime, poolInfo, poolInitialized, poolLifeCycleListener, poolWaitQueueClass, preferValidateOverRecreate, reconfigWaitQueue, resizeQuantity, resizerTask, resourceGatewayClass, resourceSelectionStrategyClass, steadyPoolSize, timer, validateAtmostPeriodInMilliSeconds_, validation, waitQueue
-
-
Constructor Summary
Constructors Constructor Description UnpooledResource(PoolInfo poolInfo, Hashtable env)Creates a new instance of UnpooledResourcePool
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfreeResource(ResourceHandle resourceHandle)protected ResourceHandlegetUnenlistedResource(ResourceSpec spec, ResourceAllocator alloc, jakarta.transaction.Transaction tran)To provide an unenlisted, valid, matched resource from pool.protected voidinitPool(ResourceAllocator allocator)protected ResourceHandleprefetch(ResourceSpec spec, ResourceAllocator alloc, jakarta.transaction.Transaction tran)Overridden in AssocWithThreadResourcePool to fetch the resource cached in the ThreadLocal In ConnectionPool this simply returns null.protected voidreconfigureSteadyPoolSize(int oldSteadyPoolSize, int newSteadyPoolSize)voidresourceErrorOccurred(ResourceHandle resourceHandle)-
Methods inherited from class com.sun.enterprise.resource.pool.ConnectionPool
addResource, blockRequests, cancelResizerTask, cleanupResource, createResource, createResourceAndAddToPool, createSingleResource, createSingleResourceAndAdjustPool, deleteResource, dumpPoolStatus, emptyFreeConnectionsInPool, emptyPool, flushConnectionPool, freeUnenlistedResource, getIdleTimeout, getInvalidConnections, getMaxPoolSize, getPoolConfigurationFromJndi, getPoolInfo, getPoolStatus, getPoolWaitQueue, getReconfigWaitQueue, getReconfigWaitTime, getResizeQuantity, getResource, getResourceFromPool, getSteadyPoolSize, getWaitQueueLength, initializePoolDataStructure, initializePoolWaitQueue, initializeResizer, initializeResourceSelectionStrategy, internalGetResource, invalidConnectionDetected, isConnectionValid, isResourceUnused, isSelfManaged, matchConnection, notifyWaitingThreads, performMaxConnectionUsageOperation, potentialConnectionLeakFound, printConnectionLeakTrace, reclaimConnection, reconfigurePool, removePoolLifeCycleListener, resizePool, resourceClosed, resourceEnlisted, setMaxPoolSize, setPoolLifeCycleListener, setResourceStateToBusy, setResourceStateToFree, setSelfManaged, setSteadyPoolSize, switchOnMatching, toString, transactionCompleted
-
-
-
-
Constructor Detail
-
UnpooledResource
public UnpooledResource(PoolInfo poolInfo, Hashtable env) throws PoolingException
Creates a new instance of UnpooledResourcePool- Throws:
PoolingException
-
-
Method Detail
-
initPool
protected void initPool(ResourceAllocator allocator) throws PoolingException
- Overrides:
initPoolin classConnectionPool- Throws:
PoolingException
-
prefetch
protected ResourceHandle prefetch(ResourceSpec spec, ResourceAllocator alloc, jakarta.transaction.Transaction tran)
Description copied from class:ConnectionPoolOverridden in AssocWithThreadResourcePool to fetch the resource cached in the ThreadLocal In ConnectionPool this simply returns null.- Overrides:
prefetchin classConnectionPool- Parameters:
spec- ResourceSpecalloc- ResourceAllocator to create a resourcetran- Transaction- Returns:
- ResourceHandle resource from ThreadLocal
-
reconfigureSteadyPoolSize
protected void reconfigureSteadyPoolSize(int oldSteadyPoolSize, int newSteadyPoolSize) throws PoolingException- Overrides:
reconfigureSteadyPoolSizein classConnectionPool- Throws:
PoolingException
-
getUnenlistedResource
protected ResourceHandle getUnenlistedResource(ResourceSpec spec, ResourceAllocator alloc, jakarta.transaction.Transaction tran) throws PoolingException
Description copied from class:ConnectionPoolTo provide an unenlisted, valid, matched resource from pool.- Overrides:
getUnenlistedResourcein classConnectionPool- Parameters:
spec- ResourceSpecalloc- ResourceAllocatortran- Transaction- Returns:
- ResourceHandle resource from pool
- Throws:
PoolingException- Exception while getting resource from pool
-
resourceErrorOccurred
public void resourceErrorOccurred(ResourceHandle resourceHandle) throws IllegalStateException
- Specified by:
resourceErrorOccurredin interfaceResourcePool- Overrides:
resourceErrorOccurredin classConnectionPool- Throws:
IllegalStateException
-
freeResource
protected void freeResource(ResourceHandle resourceHandle)
- Overrides:
freeResourcein classConnectionPool
-
-