Package com.sun.enterprise.resource.rm
Interface ResourceManager
-
- All Known Implementing Classes:
LazyEnlistableResourceManagerImpl
,NoTxResourceManagerImpl
,ResourceManagerImpl
,SystemResourceManagerImpl
public interface ResourceManager
Interface 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 void
delistResource(ResourceHandle resource, int xaresFlag)
Delist the resource from the transaction.void
enlistResource(ResourceHandle h)
Enlist the Resource handle to the transaction.Object
getComponent()
Get the component involved in invocation.jakarta.transaction.Transaction
getTransaction()
Returns the current Transaction, resource should be dealing with.void
registerResource(ResourceHandle handle)
Register the resource for a transaction's house keeping activities.void
rollBackTransaction()
Set the transaction for rolling back.void
unregisterResource(ResourceHandle resource, int xaresFlag)
Unregister the resource from a transaction's list.
-
-
-
Method Detail
-
getTransaction
jakarta.transaction.Transaction getTransaction() throws PoolingException
Returns 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
-
-