Package com.sun.enterprise.resource.pool
Interface ResourceHandler
-
- All Known Implementing Classes:
AssocWithThreadResourcePool,ConnectionPool,UnpooledResource
public interface ResourceHandlerResourceHandler to create/delete resource- Author:
- Jagadish Ramu
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceHandlecreateResource(ResourceAllocator allocator)create a new resource using the given resource-allocatorvoidcreateResourceAndAddToPool()create a new resource and add it to pool (using default resource-allocator)voiddeleteResource(ResourceHandle resourceHandle)destroys the given resourceSetgetInvalidConnections(Set connections)gets the invalid connections from the given connections setvoidinvalidConnectionDetected(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 PoolingExceptioncreate 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
-
-