Package com.sun.enterprise.resource.rm
Interface ResourceManager
-
- All Known Implementing Classes:
LazyEnlistableResourceManagerImpl,NoTxResourceManagerImpl,ResourceManagerImpl,SystemResourceManagerImpl
public interface ResourceManagerInterface definition for the Resource Manager. Depending on the ResourceSpec, PoolManager selects appropriate Resource Manager.- Author:
- Binod PG
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelistResource(ResourceHandle resource, int xaresFlag)Delist the resource from the transaction.voidenlistResource(ResourceHandle h)Enlist the Resource handle to the transaction.ObjectgetComponent()Get the component involved in invocation.jakarta.transaction.TransactiongetTransaction()Returns the current Transaction, resource should be dealing with.voidregisterResource(ResourceHandle handle)Register the resource for a transaction's house keeping activities.voidrollBackTransaction()Set the transaction for rolling back.voidunregisterResource(ResourceHandle resource, int xaresFlag)Unregister the resource from a transaction's list.
-
-
-
Method Detail
-
getTransaction
jakarta.transaction.Transaction getTransaction() throws PoolingExceptionReturns the current Transaction, resource should be dealing with.- Returns:
- An instance of Transaction object.
- Throws:
PoolingException- If there is any error in getting the transaction
-
getComponent
Object getComponent()
Get the component involved in invocation. Returns null , if there is no component is involved in the current invocation.- Returns:
- object handle
-
enlistResource
void enlistResource(ResourceHandle h) throws PoolingException
Enlist the Resource handle to the transaction.- Parameters:
h- Resource to be enlisted.- Throws:
PoolingException- If there is any error in enlisting.
-
registerResource
void registerResource(ResourceHandle handle) throws PoolingException
Register the resource for a transaction's house keeping activities.- Parameters:
handle- Resource to be registered.- Throws:
PoolingException- If there is any error in registering.
-
rollBackTransaction
void rollBackTransaction()
Set the transaction for rolling back.
-
delistResource
void delistResource(ResourceHandle resource, int xaresFlag)
Delist the resource from the transaction.- Parameters:
resource- Resource to be delisted.xaresFlag- XA Flag
-
unregisterResource
void unregisterResource(ResourceHandle resource, int xaresFlag)
Unregister the resource from a transaction's list.- Parameters:
resource- Resource to be unregistered.xaresFlag- XA Flag
-
-