@Service public class PoolManagerImpl extends AbstractPoolManager implements ComponentInvocationHandler
| Modifier and Type | Field and Description |
|---|---|
protected static StringManager |
localStrings |
BASIC_PASSWORD, GENERIC_CREDENTIAL, KERBV5, LOCAL_TRANSACTION, NO_TRANSACTION, PASSWORD_CREDENTIAL, XA_TRANSACTION| Constructor and Description |
|---|
PoolManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPostInvoke(ComponentInvocation.ComponentInvocationType invType,
ComponentInvocation prevInv,
ComponentInvocation curInv)
Called after the curInv has been popped from the invocation stack.
|
void |
afterPreInvoke(ComponentInvocation.ComponentInvocationType invType,
ComponentInvocation prevInv,
ComponentInvocation curInv)
Called after the curInv has been pushed into the invocation stack.
|
void |
badResourceClosed(ResourceHandle resource) |
void |
beforePostInvoke(ComponentInvocation.ComponentInvocationType invType,
ComponentInvocation prevInv,
ComponentInvocation curInv)
Called before the curInv has been popped from the invocation stack.
|
void |
beforePreInvoke(ComponentInvocation.ComponentInvocationType invType,
ComponentInvocation prevInv,
ComponentInvocation newInv)
Called before the curInv is pushed into the invocation stack.
|
void |
createEmptyConnectionPool(PoolInfo poolInfo,
ConnectorConstants.PoolType pt,
Hashtable env) |
boolean |
flushConnectionPool(PoolInfo poolInfo)
Flush Connection pool by reinitializing the connections
established in the pool.
|
ResourcePool |
getPool(PoolInfo poolInfo) |
PoolStatus |
getPoolStatus(PoolInfo poolInfo)
Get connection pool status.
|
Object |
getResource(ResourceSpec spec,
ResourceAllocator alloc,
ClientSecurityInfo info)
Obtain a transactional resource such as JDBC connection
|
ResourceHandle |
getResourceFromPool(ResourceSpec spec,
ResourceAllocator alloc,
ClientSecurityInfo info,
Transaction tran) |
ResourceReferenceDescriptor |
getResourceReference(String jndiName,
String logicalName) |
void |
killFreeConnectionsInPools() |
void |
killPool(PoolInfo poolInfo)
Kill the pool with the specified pool name
|
void |
lazyEnlist(javax.resource.spi.ManagedConnection mc)
This method gets called by the LazyEnlistableConnectionManagerImpl when
a connection needs enlistment, i.e on use of a Statement etc.
|
void |
putbackBadResourceToPool(ResourceHandle h) |
void |
putbackDirectToPool(ResourceHandle h,
PoolInfo poolInfo) |
void |
putbackResourceToPool(ResourceHandle h,
boolean errorOccurred) |
void |
reconfigPoolProperties(ConnectorConnectionPool ccp) |
void |
registerPoolLifeCycleListener(PoolLifeCycle poolListener) |
void |
registerResource(ResourceHandle handle)
registers the provided resource with the component & enlists the resource in the transaction
|
void |
resourceAbortOccurred(ResourceHandle resource) |
void |
resourceClosed(ResourceHandle resource) |
void |
resourceEnlisted(Transaction tran,
ResourceHandle h)
Indicate that a resource is enlisted.
|
void |
resourceErrorOccurred(ResourceHandle resource) |
boolean |
switchOnMatching(PoolInfo poolInfo)
Switch on matching in the pool.
|
void |
transactionCompleted(Transaction tran,
int status) |
void |
unregisterPoolLifeCycleListener() |
void |
unregisterResource(ResourceHandle resource,
int xaresFlag)
unregisters the resource from the component and delists the resource from the transaction
|
emptyResourcePool, getMonitoredPoolTable, killAllPools, setSelfManagedprotected static final StringManager localStrings
public void createEmptyConnectionPool(PoolInfo poolInfo, ConnectorConstants.PoolType pt, Hashtable env) throws PoolingException
createEmptyConnectionPool in interface PoolManagerPoolingExceptionpublic Object getResource(ResourceSpec spec, ResourceAllocator alloc, ClientSecurityInfo info) throws PoolingException, javax.resource.spi.RetryableUnavailableException
PoolManagergetResource in interface PoolManagerspec - Specification for the resourcealloc - Allocator for the resourceinfo - Client security for this requestPoolingException - Thrown if some error occurs while
obtaining the resourcejavax.resource.spi.RetryableUnavailableExceptionpublic void putbackDirectToPool(ResourceHandle h, PoolInfo poolInfo)
putbackDirectToPool in interface PoolManagerpublic ResourceHandle getResourceFromPool(ResourceSpec spec, ResourceAllocator alloc, ClientSecurityInfo info, Transaction tran) throws PoolingException, javax.resource.spi.RetryableUnavailableException
getResourceFromPool in interface PoolManagerPoolingExceptionjavax.resource.spi.RetryableUnavailableExceptionpublic boolean switchOnMatching(PoolInfo poolInfo)
switchOnMatching in interface PoolManagerpoolInfo - Name of the poolpublic void transactionCompleted(Transaction tran, int status) throws IllegalStateException
transactionCompleted in interface PoolManagerIllegalStateExceptionpublic void resourceEnlisted(Transaction tran, ResourceHandle h) throws IllegalStateException
TransactedPoolManagerresourceEnlisted in interface TransactedPoolManagertran - Transaction to which the resource is enlistedh - Resource that is enlistedIllegalStateException - when unable to enlist the resourcepublic void lazyEnlist(javax.resource.spi.ManagedConnection mc)
throws javax.resource.ResourceException
lazyEnlist in interface PoolManagerjavax.resource.ResourceExceptionpublic void registerResource(ResourceHandle handle) throws PoolingException
TransactedPoolManagerregisterResource in interface TransactedPoolManagerhandle - resource-handlePoolingException - when unable to register the resourcepublic void registerPoolLifeCycleListener(PoolLifeCycle poolListener)
registerPoolLifeCycleListener in interface PoolManagerpublic void unregisterPoolLifeCycleListener()
unregisterPoolLifeCycleListener in interface PoolManagerpublic void unregisterResource(ResourceHandle resource, int xaresFlag)
TransactedPoolManagerunregisterResource in interface TransactedPoolManagerresource - resource-handlepublic void resourceClosed(ResourceHandle resource)
resourceClosed in interface PoolManagerpublic void badResourceClosed(ResourceHandle resource)
badResourceClosed in interface PoolManagerpublic void resourceErrorOccurred(ResourceHandle resource)
resourceErrorOccurred in interface PoolManagerpublic void resourceAbortOccurred(ResourceHandle resource)
resourceAbortOccurred in interface PoolManagerpublic void putbackBadResourceToPool(ResourceHandle h)
putbackBadResourceToPool in interface PoolManagerpublic void putbackResourceToPool(ResourceHandle h, boolean errorOccurred)
putbackResourceToPool in interface PoolManagerpublic ResourcePool getPool(PoolInfo poolInfo)
getPool in interface PoolManagerpublic void killPool(PoolInfo poolInfo)
killPool in interface PoolManagerpoolInfo - - The name of the pool to killpublic void killFreeConnectionsInPools()
killFreeConnectionsInPools in interface PoolManagerpublic ResourceReferenceDescriptor getResourceReference(String jndiName, String logicalName)
getResourceReference in interface PoolManagerpublic void beforePreInvoke(ComponentInvocation.ComponentInvocationType invType, ComponentInvocation prevInv, ComponentInvocation newInv) throws InvocationException
ComponentInvocationHandlerbeforePreInvoke in interface ComponentInvocationHandlerInvocationExceptionpublic void afterPreInvoke(ComponentInvocation.ComponentInvocationType invType, ComponentInvocation prevInv, ComponentInvocation curInv) throws InvocationException
ComponentInvocationHandlerafterPreInvoke in interface ComponentInvocationHandlerInvocationExceptionpublic void beforePostInvoke(ComponentInvocation.ComponentInvocationType invType, ComponentInvocation prevInv, ComponentInvocation curInv) throws InvocationException
ComponentInvocationHandlerbeforePostInvoke in interface ComponentInvocationHandlerInvocationExceptionpublic void afterPostInvoke(ComponentInvocation.ComponentInvocationType invType, ComponentInvocation prevInv, ComponentInvocation curInv) throws InvocationException
ComponentInvocationHandlerafterPostInvoke in interface ComponentInvocationHandlerInvocationExceptionpublic void reconfigPoolProperties(ConnectorConnectionPool ccp) throws PoolingException
reconfigPoolProperties in interface PoolManagerPoolingExceptionpublic boolean flushConnectionPool(PoolInfo poolInfo) throws PoolingException
flushConnectionPool in interface PoolManagerpoolInfo - PoolingExceptionpublic PoolStatus getPoolStatus(PoolInfo poolInfo)
getPoolStatus in interface PoolManagerpoolInfo - Copyright © 2019. All rights reserved.