Class AbstractConnectorAllocator
- java.lang.Object
-
- com.sun.enterprise.resource.allocator.AbstractConnectorAllocator
-
- All Implemented Interfaces:
ResourceAllocator
- Direct Known Subclasses:
BasicResourceAllocator,ConnectorAllocator,LocalTxConnectorAllocator,NoTxConnectorAllocator
public abstract class AbstractConnectorAllocator extends Object implements ResourceAllocator
An abstract implementation of theResourceAllocatorinterface that houses all the common implementation(s) of the various connector allocators. All resource allocators exceptBasicResourceAllocatorextend this abstract implementation- Author:
- Sivakumar Thyagarajan
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger_loggerprotected ConnectorDescriptordescprotected ClientSecurityInfoinfoprotected jakarta.resource.spi.ManagedConnectionFactorymcfprotected PoolManagerpoolMgrprotected jakarta.resource.spi.ConnectionRequestInforeqInfoprotected ResourceSpecspecprotected Subjectsubject
-
Constructor Summary
Constructors Constructor Description AbstractConnectorAllocator()AbstractConnectorAllocator(PoolManager poolMgr, jakarta.resource.spi.ManagedConnectionFactory mcf, ResourceSpec spec, Subject subject, jakarta.resource.spi.ConnectionRequestInfo reqInfo, ClientSecurityInfo info, ConnectorDescriptor desc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup(ResourceHandle h)voidcloseUserConnection(ResourceHandle resource)protected ResourceHandlecreateResourceHandle(Object resource, ResourceSpec spec, ResourceAllocator alloc, ClientSecurityInfo info)voiddestroyResource(ResourceHandle resourceHandle)voidfillInResourceObjects(ResourceHandle resourceHandle)SetgetInvalidConnections(Set connectionSet)ObjectgetSharedConnection(ResourceHandle h)booleanhasValidatingMCF()booleanisConnectionValid(ResourceHandle h)booleanisTransactional()booleanmatchConnection(ResourceHandle h)booleanshareableWithinComponent()booleansupportsReauthentication()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.enterprise.resource.allocator.ResourceAllocator
createResource
-
-
-
-
Field Detail
-
poolMgr
protected PoolManager poolMgr
-
spec
protected ResourceSpec spec
-
reqInfo
protected jakarta.resource.spi.ConnectionRequestInfo reqInfo
-
subject
protected Subject subject
-
mcf
protected jakarta.resource.spi.ManagedConnectionFactory mcf
-
desc
protected ConnectorDescriptor desc
-
info
protected ClientSecurityInfo info
-
_logger
protected static final Logger _logger
-
-
Constructor Detail
-
AbstractConnectorAllocator
public AbstractConnectorAllocator()
-
AbstractConnectorAllocator
public AbstractConnectorAllocator(PoolManager poolMgr, jakarta.resource.spi.ManagedConnectionFactory mcf, ResourceSpec spec, Subject subject, jakarta.resource.spi.ConnectionRequestInfo reqInfo, ClientSecurityInfo info, ConnectorDescriptor desc)
-
-
Method Detail
-
getInvalidConnections
public Set getInvalidConnections(Set connectionSet) throws jakarta.resource.ResourceException
- Specified by:
getInvalidConnectionsin interfaceResourceAllocator- Throws:
jakarta.resource.ResourceException
-
isConnectionValid
public boolean isConnectionValid(ResourceHandle h)
- Specified by:
isConnectionValidin interfaceResourceAllocator
-
destroyResource
public void destroyResource(ResourceHandle resourceHandle) throws PoolingException
- Specified by:
destroyResourcein interfaceResourceAllocator- Throws:
PoolingException
-
fillInResourceObjects
public void fillInResourceObjects(ResourceHandle resourceHandle) throws PoolingException
- Specified by:
fillInResourceObjectsin interfaceResourceAllocator- Throws:
PoolingException
-
supportsReauthentication
public boolean supportsReauthentication()
- Specified by:
supportsReauthenticationin interfaceResourceAllocator
-
isTransactional
public boolean isTransactional()
- Specified by:
isTransactionalin interfaceResourceAllocator
-
cleanup
public void cleanup(ResourceHandle h) throws PoolingException
- Specified by:
cleanupin interfaceResourceAllocator- Throws:
PoolingException
-
matchConnection
public boolean matchConnection(ResourceHandle h)
- Specified by:
matchConnectionin interfaceResourceAllocator
-
closeUserConnection
public void closeUserConnection(ResourceHandle resource) throws PoolingException
- Specified by:
closeUserConnectionin interfaceResourceAllocator- Throws:
PoolingException
-
shareableWithinComponent
public boolean shareableWithinComponent()
- Specified by:
shareableWithinComponentin interfaceResourceAllocator
-
getSharedConnection
public Object getSharedConnection(ResourceHandle h) throws PoolingException
- Specified by:
getSharedConnectionin interfaceResourceAllocator- Throws:
PoolingException
-
createResourceHandle
protected ResourceHandle createResourceHandle(Object resource, ResourceSpec spec, ResourceAllocator alloc, ClientSecurityInfo info)
-
hasValidatingMCF
public boolean hasValidatingMCF()
- Specified by:
hasValidatingMCFin interfaceResourceAllocator
-
-