Package com.sun.enterprise.resource.pool
Interface ResourceHandler
-
- All Known Implementing Classes:
AssocWithThreadResourcePool
,ConnectionPool
,UnpooledResource
public interface ResourceHandler
ResourceHandler to create/delete resource- Author:
- Jagadish Ramu
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceHandle
createResource(ResourceAllocator allocator)
create a new resource using the given resource-allocatorvoid
createResourceAndAddToPool()
create a new resource and add it to pool (using default resource-allocator)void
deleteResource(ResourceHandle resourceHandle)
destroys the given resourceSet
getInvalidConnections(Set connections)
gets the invalid connections from the given connections setvoid
invalidConnectionDetected(ResourceHandle h)
callback method to handle the case of invalid connection detected
-
-
-
Method Detail
-
deleteResource
void deleteResource(ResourceHandle resourceHandle)
destroys the given resource- Parameters:
resourceHandle
- resource to be destroyed
-
createResource
ResourceHandle createResource(ResourceAllocator allocator) throws PoolingException
create a new resource using the given resource-allocator- Parameters:
allocator
- allocator to create a resource- Returns:
- newly created resource
- Throws:
PoolingException
- when unable to create a resource
-
createResourceAndAddToPool
void createResourceAndAddToPool() throws PoolingException
create a new resource and add it to pool (using default resource-allocator)- Throws:
PoolingException
- when unable to create a resource
-
getInvalidConnections
Set getInvalidConnections(Set connections) throws jakarta.resource.ResourceException
gets the invalid connections from the given connections set- Parameters:
connections
- that need to be validated- Returns:
- invalid connections set
- Throws:
jakarta.resource.ResourceException
- when unable to validate
-
invalidConnectionDetected
void invalidConnectionDetected(ResourceHandle h)
callback method to handle the case of invalid connection detected- Parameters:
h
- connection that is invalid
-
-